Python version upgrade (CentOS) from 2.6.6 to 2.7.6, centos2.7.6
# Install other Dependencies before upgrading
Yum install readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs zlib-devel-y
# Download python installation package 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.7make & make installmake cleanmake distclean
# Remove the old Python link mv/usr/bin/python/usr/bin/python2.6.6
Ln-s/usr/local/python2.7/bin/python2.7/usr/bin/python # Install 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 # manually set the environment variable # 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 takes effect, it takes effect only after 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 #