I'm trying to install VIM with Python support on Linux without sudo, but for some reason VIM always gets installed without python ( -python in vim --version )

  1. I first installed Python locally by downloading the tgz file and decompressing it in $HOME

  2. Then I cd to that directory and ran: ./configure --prefix=$HOME/python && make && make install

I already got VIM installed without Python support, so I just went to the VIM source directory and ran the following:

  1. ./configure --prefix=$HOME --with-features=huge --enable-pythoninterp --without-x --with-python-config-dir=/home/<user>/python/lib/python2.7/config

  2. make && make install

VIM so far still shows -python and echo has('python') returns 0

The <vim-src>/src/auto/config.log file shows that it's trying to use the system python:

configure:5486: checking for python
configure:5504: found /usr/bin/python 
configure:5740: result: no: PYTHON DISABLED

but fails and end up not adding python support!.

Am I doing something wrong here?

  • Hi there, this may not directly related to your problem but I suggest you have a look at linuxbrew. It will allow you to install many software to your own home directory, vim, Emacs, pyenv, rbenv etc etc. Commented May 1, 2015 at 6:47
  • ruby is not installed on the machine I'm using, and I can't install it since I don't have sudo :(
    – Yohanna
    Commented May 4, 2015 at 14:49
  • You can install linuxbrew by git git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew but it does need some development libraries and tools to build other software. Anyway, I still suggest you give it a go. Commented May 5, 2015 at 0:28

2 Answers 2


Check the output of vim ./configure and the files it generated (./src/auto/config.h, ./src/auto/config.status) for the Python support.

Also make sure you're executing the right vim binary.

  • Thanks spuk, the ./configure output actually shows it was using the system python executable not the local version of python, I didn't notice this before. I've updated the question with extra details about the log output.
    – Yohanna
    Commented Jun 8, 2015 at 16:16

Apparently ./configure was trying to use the system python executable in /usr/bin/python and since I wasn't running it with sudo, it was failing for some reason.

./configure looks in your $PATH for the python executable, so I had to add the local python bin dir to my $Path before the /usr/bin dir.

So adding something like this export PATH=$HOME/python/bin:$PATH in .bashrc made it work.

Note that the local python bin directory has to be before the /usr/bin/ dir in $PATH.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .