Using CentOS and upgrade from Python 2.6 to Python 2.7.8, I upgraded successfully by building from source. But it seems python
command (/usr/bin/python
) still points to old python 2.6 version? Wondering what is the safe way to change default python
command to point to python2.7 location (which is /usr/local/bin/python2.7
)?
[root@iZrj9aehttqhrnhsvyccszZ Python-2.7.8]# which python
/usr/bin/python
[root@iZrj9aehttqhrnhsvyccszZ Python-2.7.8]# ls -l /usr/bin/python
-rwxr-xr-x 2 root root 4864 Aug 18 23:14 /usr/bin/python
[root@iZrj9aehttqhrnhsvyccszZ Python-2.7.8]# uname -a
Linux iZrj9aehttqhrnhsvyccszZ 2.6.32-573.22.1.el6.x86_64 #1 SMP Wed Mar 23 03:35:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@iZrj9aehttqhrnhsvyccszZ Python-2.7.8]# which python2.7
/usr/local/bin/python2.7