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!
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With