Reputation: 228
I am trying to set up YouCompleteMe, a code-completion plugin for vim. When I run vim, it gives me this error message: "YouCompleteMe unavailable: requires python 2.x". I have the correct version of python installed on my ubuntu machine and this confused me. After some research, I have found that I needed python2 support in vim, not just on my system (https://github.com/Valloric/YouCompleteMe/issues/35). How can I do this? I was unable to find a similar answer anywhere.
Thanks in advance for the help!
Upvotes: 10
Views: 10248
Reputation: 349
It means your need python2 support in vim, not just in your system. To test whether your vim support python, execute the following command:
vim --version | grep python
If you find "+python" in the output your vim support python2, "-python" means your vim don't support python2, you need recompile vim with python flag via the vim source.
On windows platform try the following command:
nmake -f Make_mvc.mak FEATURES=huge PYTHON=D:\Python27 PYTHON_VER=27 GUI=yes IME=yes
on Linux platform try the folowing command:
./configure --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.6/config make make install
more details see:
compiling vim with python support
https://github.com/Valloric/YouCompleteMe/issues/35
Upvotes: 4
Reputation: 21
The problem was that the YouCompleteMe fails if both python3 and python2 support are compiled into Vim. Both version can't be used so the first one touched will prevent the other one from working.
Upvotes: 2
Reputation: 8492
Try aptitude install vim-nox
or aptitude install vim-gnome
if you want the GUI. vim-python
is a virtual package provided by either of these.
By default, Ubuntu has vim-tiny
installed, which has a bunch of the options switched off.
Upvotes: 8