I've successfully built from sources and installed python version 2.7.10 into folder /usr/local. And then I have executed /usr/local/bin/python and it has shown that it has version 2.7.6. Which is not correct. Trying to find out what is wrong, I've run ldd /usr/local/bin/python and got the following:
linux-vdso.so.1 => (0x00007fffd5fe4000)
libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007f2c006f8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2c004da000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2c00115000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2bffefc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2bffcf8000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f2bffaf5000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2bff7ef000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2c00c5c000)
Which means that manually built python 2.7.10 loads *.so library of python 2.7.6, which was installed by default package manager. Could you help to find out why this happens?
Configuring have been done by the following commands:
./configure --prefix=/usr/local --enable-shared
I am using Linux Mint 17.2 Rafaela KDE edition, which is based on Ubuntu 14.04.3