1. Download python2.7.x
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
2. Unzip and compile the installation
TAR-ZXVF python-2.7.6.tgz && cd Python-2.7.6 &&/configure && make all && make install & amp;& make && make Distclean
3. Check Installation
/usr/local/bin/python2.7-v
4. Establish a soft connection, using the system default Python point
mv/usr/bin/python/usr/bin/python2.6.6
Ln-s/usr/local/bin/python2.7/usr/bin/python
5. Check
Python-v
6. Need to pay attention to using Yum
Solution System Python Soft links point to Python2.7 version, because Yum is incompatible with Python 2.7, so Yum does not work properly, we need to specify the Python version of Yum
Vim/usr/bin/yum Change the head #!/usr/bin/python to #!/usr/bin/python2.6.6 (just back up)
The above is a small series to introduce the Python 2.6.6 upgrade to the Python 2.7.x version of the method, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!