1 #升级前必须先安装其它依赖2 Yum InstallReadline-devel Sqlite-develbzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs zlib-devel-y3 #下载python安装包4 wgetHttps//www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz5 Tar-ZXVF python-2.7.6. tgz6CD python-2.7.67./configure--prefix=/usr/local/python2.78 Make&& Make Install9 Make CleanTen MakeDistclean One #移除旧的Python链接 A MV/usr/bin/python/usr/bin/python2.6.6 - - LN-s/usr/local/python2.7/bin/python2.7/usr/bin/python the #安装setuptools - CD.. - wgethttp//pypi.douban.com/packages/source/s/setuptools/setuptools-12.0.5.tar.gz - TarZXVF setuptools-12.0.5.Tar. GZ +CD setuptools-12.0.5 - python setup.py build +Python setup.pyInstall A #手动设置环境变量 at#VI/etc/ Profile - #添加如下内容: -#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 in #查找easy_install -#Find/ -name Easy_install to#LN-s/usr/local/python2.7/bin/easy_install/usr/bin/Easy_install + #easy_install Pip -#Find/ -name Pip the#
Python version upgrade (CentOS) upgrade from 2.6.6 to 2.7.6