sys.exec_prefix doesn't seem to reflect --exec-prefix path

Ralph Heinkel ralph.heinkel at web.de
Thu Mar 26 08:37:45 EDT 2015


Hi,

on my linux box there is a python version 2.7.5 installed in /usr/local.

Now I want to install the newer version 2.7.9, but in a different directory to avoid clashes with the current installation.

What I did was:

./configure --prefix /usr/local/Python-2.7.9 --exec-prefix /usr/local/Python-2.7.9
make
make install

Everything looks fine, Python is installed in the proper directory.

BUT: When I run /usr/local/Python-2.7.9/bin/python and do 'print sys.exec_prefix' it prints '/usr/local' instead of '/usr/local/Python-2.7.9'.

This has the effect that the old libraries of version 2.7.5 are used instead of the 2.7.9 ones.

The docs in https://docs.python.org/2/library/sys.html state that sys.exec_prefix will reflect the value given to option --exec-prefix at configuration time. Any idea what I did wrong? 

Thanks for your help,

Ralph



More information about the Python-list mailing list