YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support
Asked Answered
M

6

17

i have vim 8.2.850. I am trying to install YouCompleteMe. But get this error, when trying to open vim:

"YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support"

How can i fix this? i saw other ppl answer for different versions. But sorry im a noob, could someone please help and give a detailed explaination on how to fix it?

And i am on mac, using terminal

Moisture answered 22/12, 2020 at 18:7 Comment(2)
github.com/ycm-core/YouCompleteMe/wiki/Building-Vim-from-sourcePhenomenalism
Recommend you try coc.nvim or nvim.lsp; source: reddit.com/r/vimporn/comments/lgksrq/comment/goeshsx/…Shannonshanny
O
14

It is an old question but I wanted to add I simply installed macvim and re-started terminal again. It solved my problem

- brew install macvim 
Opalopalesce answered 11/4, 2021 at 16:46 Comment(2)
I use terminal vim, but installing this somehow fixed my terminal vim as well ! Thanks :)Lanyard
Same here. Thank you very much.Krasnoff
O
4

I'm aware that this isn't directed at your question per say, but I ran into the same issue on Ubuntu with nvim. Reinstalling didn't help, but adding https://github.com/neovim/pynvim fixed my issue. Perhaps it can be helpful to Mac users using nvim too.

Osis answered 14/12, 2021 at 19:40 Comment(0)
G
3

you can use vim --version | grep python to check your vim. If vim detects the python3, it will show like:

+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit

The python3 will have a + sign in front of that.

If not, first, you must check if you have python3.

Second, you need to uninstall vim (sudo apt purge vim), then reinstall vim (sudo apt install vim).

Third. Reconfirmation by vim --version | grep python.

I hope this can help you.

Gee answered 4/10, 2022 at 8:53 Comment(2)
I have python3 install and proceeded with the uninstall and reinstall as you suggest but I still have a - instead of + in front of python3Vanessa
In the end, following these steps as well as installing python3-dev was able to get the +python in my versioning. In my opinion this is the cleanest solution that required the fewest modifications or installs that didn't make sense +1Vanessa
B
1

Yes, you can reinstall the latest vim version with homebrew: https://formulae.brew.sh/formula/vim

But, I think you should recheck your vim version with :version, there is no version like yours.

And the latest version itself depends on python, and more like nvim.

# I do like this
brew install vim --HEAD
Buzz answered 24/12, 2020 at 8:47 Comment(0)
S
1

Confirmed

brew install macvim

worked for me after restarting terminal. Make sure to

brew uninstall vim

before installing macvim, then restart terminal. Solved it for me on new Mac with new apple chip.

Sarina answered 2/12, 2022 at 0:42 Comment(0)
C
-1

Thankfully, the error message is pretty solid. You need vim with Python, Now while I don't personally have a mac that should be as straightforward as making sure you install the correct version.

The simplest way is probably going to be with brew as mentioned here.

brew remove vim
brew cleanup
brew install vim --with-python

If you installed it with a binary you will need to find a new binary with python included. Or alternatively you could try and build it from source as the comment from Zoe suggested. But I think that may be somewhat more involved than ideal for a beginner, although worthwhile.


It doesn't seem, like this actually involves neovim at all, If it does then you may want to update your question, otherwise it is a good idea to remove the neovim tag.

Centrepiece answered 22/12, 2020 at 21:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.