compiling vim with python support compiling vim with python support python python

compiling vim with python support


I've also had "... and link flags for Python are sane... no: PYTHON DISABLED"

On Ubuntu 10.04 you have to install 'python2.6-dev'. The flags for ./configure are:

--enable-pythoninterp--with-python-config-dir=/usr/lib/python2.6/config

Make sure you got a path to directory, which contains 'config.c' file. Also no '/' at the end of the path! That caused me problems.


You could try adding the option --with-python-config-dir=/your/python/config/dir

The path should point to the location of the file config.c of your Python installation.


Yea! I figured it out, so I'm writing up a quick how-to in case others run into the same issue:

  1. I didn't notice an important message in the configure output:

    checking if compile and link flags for Python are sane... no: PYTHON DISABLED 
  2. The log file had more info located in src/auto/config.log:

    /usr/bin/ld: skipping incompatible <mypydist>/2.5/lib/python2.5/config//libpython2.5.a when searching for -lpython2.5/usr/bin/ld: cannot find -lpython2.5
  3. I found an old thread that said you can override the gcc call by setting:

    export vi_cv_path_python_plibs="-L/<mypydist>/2.5/lib/python2.5/config/ ..."excluding the -lpython2.5

Now it compiles.