I am trying to compile vim from source with python or python3, but they are never present after installation. I am following the instructions from youcompleteme wiki and have installed VIM - Vi IMproved 8.0, more specifically version 8.0.579.

I copy pasted the ./configure and found out that I don't have my python config file where the guide said I should. So I used which python to see where python is. And sure enough I found the file in /usr/bin/python3.5-config and changed the ./configure script. I found vim80 in /usr/local/share/vim/vim80 so there is where I sat my VIMRUNTIMEDIR. Then I did sudo make install. No errors. And no Python...

How do I add python to vim80? Am I selecting the wrong python config file? I have installed all the dependencies mentioned at the top of the GitHub page and uninstalled any previous vim installations, as well as searched for the folders where they were previously so the previous installation is completely removed to avoid messing with the new vim80.

  • If you only wanted to get vim8 on 16.04, checkout this ppa instead launchpad.net/~jonathonf/+archive/ubuntu/vim – Anwar Apr 23 '17 at 7:06
  • I ran vim.nox and executed "echo has('python3')" and it returned a "1"! But when I execute "vim" I get version 8.0.579 which doesn't have python. and in /usr/bin/vim I got vim 8.0.582 which doesn't have python either. I executed "echo $VIMRUNTIME in the 3 vim windows and one, without python, points to "/usr/local/share/vim" where no vim folder is and the other two to "/usr/share/vim/vim80/". So I got 2 different versions of vim pointing to the same runtime dir. Any fix? – vimishard Apr 23 '17 at 9:23
  • Have you removed all instance before? Can you share your parameters for ./configure? – Anwar Apr 23 '17 at 9:53
  • Yes I have but "vim 8.0.579" wont go away. I compiled from source and then I did "sudo make uninstall" and deleted all the folders with the name vim but when I execute vim it's still there, even though I removed it. My config was './configure --with-features=huge --enable-multibyte --enable-pythoninterp=yes --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.5/config-x86_64-linux-gnu/ --enable-gui=gtk2 --enable-cscope --prefix=/usr' – vimishard Apr 23 '17 at 9:58
  • I mean the parameters for .configure which you'd do with vim build. Do You know that you can't use both python2 and 3 in vim? Also the configs are in /usr/lib/python3.5 or 2.7 here on 16.04. Have you removed system python? – Anwar Apr 23 '17 at 10:02

I solved the issue by installing everything from https://launchpad.net/~jonathonf/+archive/ubuntu/vim and setting an alias of "vim-nox" equal to vim in .bashrc and thus overwriting the old vim command from the vim that doesn't work making the only vim command that work connected to the vim that actually works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.