This article describes how to upgrade CentOS6.3 from Python 2.6 to 2.7.6. Because the old version of Python in CentOS has been deeply dependent, you cannot uninstall the original Python and can only install it completely. 1. download Pyhon, select download Gzippedsourcetarball (2.7.6) (sig) Web site https://www.python.org/downloa
This article describes how to upgrade CentOS 6.3 from Python 2.6 to 2.7.6.
Because the old version of Python in CentOS has been deeply dependent, you cannot uninstall the original Python and can only install it completely.
1. download Pyhon and select to download Gzipped source tar ball (2.7.6) (sig)
Web https://www.python.org/download/releases/2.7.6
2. unzip the package and run the following command:
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 python to python2.7 by default.
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 cannot run normally)
Vi/usr/bin/yum
Set the #! of the first line #! /Usr/bin/python to the original python version address #! /Usr/bin/python2.6
So far, Python in CentOS6.3 has been successfully upgraded to version 2.7.6.