1, the Python on CentOS default is python2.6.6 need to upgrade to 2.7.* first download the correct version on the Python official website. Then you need to install the common components
Unzip the Python installation package to execute the compile command after it is counted in the Python directory
./configure
Make all
Make install
Make clean
Make Distclean
After compiling the installation, we need to annotate the original python2.6.6 to one side with MV.
mv/usr/bin/python/usr/bin/python2.6.6
Then you need to give a soft link to the python2.7.7 you just installed.
Ln–s/usr/loca/bin/python2.7.7/usr/bin/python
First python-v look at the version now Python is ready to use.
This article is from the "Eggs to Fly" blog, please be sure to keep this source http://fengchenchen.blog.51cto.com/5706243/1554638
CentOS Default python2.6 Upgrade 2.7