sadibaba2000
sadibaba2000

Reputation: 219

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

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

Upvotes: 18

Views: 29171

Answers (6)

ststst
ststst

Reputation: 41

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.

Upvotes: 1

shdenlin
shdenlin

Reputation: 31

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.

Upvotes: 3

stefanoo
stefanoo

Reputation: 41

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.

Upvotes: 4

sedat
sedat

Reputation: 151

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 

Upvotes: 15

Sheldon
Sheldon

Reputation: 611

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

Upvotes: 1

axwr
axwr

Reputation: 2236

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.

Upvotes: -1

Related Questions