#升级前必须先安装其它依赖
Yum install readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs zlib-devel-y
#下载python安装包wget https:www.python.org/ftp/python/2.7.6/Python-2.7.6. Tgztar-ZXVF Python-2.7.6. TGZCD Python-2.7.6./configure--prefix=/usr/local/python2.7 Make&&Make installmake cleanmake Distclean
#移除旧的Python链接mv/usr/bin/python/usr/bin/python2.6.6
LN-s/usr/local/python2.7/bin/python2.7/usr/bin/python#Installing SetuptoolsCD.. wget http:pypi.douban.com/packages/source/s/setuptools/setuptools-12.0.5. Tar.gztar ZXVF setuptools-12.0.5. TAR.GZCD Setuptools-12.0.5python setup.py buildpython setup.py install#setting Environment variables manually#Vi/etc/profile#Add the following content:#py_ez=/usr/local/python2.7#Export path= $PY _ez/bin: $PATH#Source/etc/profile # The current terminal is in effect and will not be fully effective until reboot#Echo $PATH#Find Easy_install#Find/-name easy_install#ln-s/usr/local/python2.7/bin/easy_install/usr/bin/easy_install#easy_install Pip#Find/-name pip#
Python version upgrade (CentOS) upgrade from 2.6.6 to 2.7.6