View the version of Python
#python-V
Python 2.6.6
1. Download Python-2.7.3
#wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
2. Unzip
#tar-JXVF python-2.7.3.tar.bz2
3. Change the working directory
#cd Python-2.7.3
4. Installation
#./configure
#make All
#make Install
#make Clean
#make Distclean
5. View version Information
#/usr/local/bin/python2.7-v
6. Establish a soft connection so that the system default Python points to python2.7
#mv/usr/bin/python/usr/bin/python2.6.6
#ln-S/usr/local/bin/python2.7/usr/bin/python
7. Re-examine the Python version
#python-V
8. Solve the system Python soft link to Python2.7 version, because Yum is not compatible with Python 2.7, so Yum does not work, we need to specify the Python version of Yum
#vi/usr/bin/yum
The file header is
#!/usr/bin/python
Change into
#!/usr/bin/python2.6.6
This article is from "I am a small fish" blog, please be sure to keep this source http://kevinfish.blog.51cto.com/1183772/1843901
Python 2.6 Upgrade to 2.7