Transferred from: http://blog.csdn.net/u010098331/article/details/52190354
This article describes the CentOS 6.3 from the Pyhon version is the 2.6 upgrade to 2.7.6 method.
Because older versions of Python in the CentOS system are deeply dependent, you cannot uninstall the original Python, only the new installation.
1. Download Pyhon, select download gzipped source tar Ball (2.7.6) (SIG)
URL https://www.python.org/download/releases/2.7.6
2. Unzip the installation, the command is as follows
TAR-XVF python-2.7.6.tgz
CD Python-2.7.6
./configure--prefix=/usr/local/python2.7
Make
Make install
3. Create a link to change the system default Python to python2.7
Ln-fs/usr/local/python2.7/bin/python2.7/usr/bin/python
4. View the Python version
Python–v
5. Modify the Yum configuration (otherwise Yum will not work)
Vi/usr/bin/yum
Modify the #!/usr/bin/python of the first line to the original Python version address of the system #!/usr/bin/python2.6
This CentOS6.3 system Python has been successfully upgraded to 2.7.6 version
Reference:
Http://www.centoscn.com/image-text/config/2015/0325/5005.html
Http://www.cnblogs.com/dudu/p/4294238.html
CENTOS6 default python2.6 Upgrade 2.7 Uninstall python2.6 upgrade 2.7