Problem: You need to rely on Python 2.7 when using the parse platform, and the Python version in centos6.5 is 2.6.
Related factors: 1. Yum relies on Python, so you need to consider this when uninstalling Python.
2. Yum does not 2.7 the Python package and therefore cannot be upgrade directly
Solution:
1. Install the new version of Python
2. Creating a soft connection to the default Python
3. Modifying the Yum configuration file
With:
1. Download python2.7.2.tgz (# wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz)
2. Installation:
$tar JXVF Python2. 7.2 . tgz $cd Python2. 7.2 $. /
Default path:/usr/local/lib/python2.7
At this point, if you use Python-v, you will find that the version remains 2.6
3. Establishing a soft connection
mv/usr/bin/python/usr/bin/-s/usr/local/bin/python2. 7
4. Modifying the Yum configuration file
$vi/usr/bin/Yum #!/usr/bin/python is modified to #!/usr/bin/python2. 6
(Usr/bin itself has Python and python2.6 two files, so to change it to the original Python version, otherwise Yum will not work)
CentOS Python Version upgrade issue