0

I tried to installed the latest version of Python2.7.13 from source on a completely new VM running Ubuntu 14.04. I just installed the some prerequisites and then download the Python2.7.13 source file from the official website.

Guided by the official doc and some tutorials that one can find, I first ran:

./configure --prefix=/usr/local \
            --enable-shared     \
            --with-system-expat \
            --with-system-ffi   \
            --enable-unicode=ucs4

followed by sudo make and sudo make altinstall.

After this, I thought in the folder /usr/local/bin there should exist a python executable with the version 2.7.13. However, I find all python-related executable (python2 and python2.7) in that folder has the version 2.7.6 which is just system python version by running

/usr/local/bin/python2.7 --version

I retried sudo make install to reinstall the new version but the outcome is still the same.

Can someone explain what am I doing wrong and how should I do this properly? All I want is compiling my own Python2.7.13 with --enable_shared in the folder /usr/local without touching the system python.

asdetrefle
  • 303
  • 1
  • 6
  • 14

1 Answers1

0

add this to the end of your ./configure options:

LDFLAGS=-Wl,-rpath=/usr/local/lib
Hec
  • 824
  • 1
  • 5
  • 24