Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Error when :py print 1: Could not load library libpython2.7.a

I tried to compile vim on ubuntu 12.04 with both python2 and python3 supports. (I also compiled and installed python by myself.). I checked :h python-dynamic and tried to place the related python library under the environment path. But still, :py and :py3 both don't work. (However there is no problem if I compile vim under the system python versions.)

Here is my configuration before make:

./configure --with-features=huge \
        --enable-gui=gnome2 \
        --enable-pythoninterp=yes \
        --with-python-config-dir=/home/bohr/local/python2.7/lib/python2.7/config \
        --enable-python3interp=yes \
        --with-python3-config-dir=/home/bohr/local/python3.3/lib/python3.3/config-3.3m \
        --prefix=/usr/local
share|improve this question
    
Define "not work": does 3.3 work? – romainl Jun 14 '13 at 5:34
    
Updated. I used python2.7 and python3.3. – Bohr Jun 14 '13 at 6:20

install earlier python 2.7.4 (instead of 2.7.5) and 3.3.1 (instead of 3.3.2) use --enable-shared

install the latest vim (mine is 7.3.1242) and "ta-ta!" everything works.

share|improve this answer

You must log in to answer this question.

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