CentOS7 has python 2.7.5 by default.
$ which python /usr/bin/python $ python --version Python 2.7.5
But I needed to use python 2.7.11. So I installed that version from source.
$ wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz $ tar xf Python-2.7.11.tgz $ cd Python-2.7.11 $ ./configure --prefix=/usr/local --enable-shared $ make $ sudo make install
Output of which command have changed. But python version is still 2.7.5.
which
$ which python /usr/local/bin/python $ python --version Python 2.7.5
So I want to know why this happened and how to fix this situation.
I've solved this like below.
$ bash -c 'echo "/usr/local/lib" >> /etc/ld.so.conf' $ sudo /sbin/ldconfig
2.1m questions
2.1m answers
60 comments
57.0k users