Basic Environment
Yum-y install wget gcc xz tar
Install zlib (if not installed zlib Setuptools may error "Compression requires the (missing) zlib module")
1. wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.11.tar.gz?download
2. TAR-XVF zlib-1.2.11.tar.gz
3. CD zlib-1.2.11 &&./configure && make && make install
Install Python
1. wget HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/2.7.12/PYTHON-2.7.12.TAR.XZ
2. xz-d python-2.7.12.tar.xz && tar-xvf Python-2.7.12.tar
3. CD Python-2.7.12 &&./configure && make && Makeinstall
4. mv/usr/bin/python/usr/bin/python2.6.6
5. Ln-s/usr/local/bin/python/usr/bin/python
6. Vim/usr/bin/yum
7. Modify the head #!/usr/bin/python2.6.6
If Python error "error while loading Sharedlibraries:libpython2.7.so.1.0:cannot open shared object file:no such file Ordirec Tory
vim/etc/ld.so.conf next line plus/usr/local/lib and execute /sbin/ldconfig-v
Installing Setuptools
1. wget https://pypi.python.org/packages/a9/23/720c7558ba6ad3e0f5ad01e0d6ea2288b486da32f053c73e259f7c392042/ Setuptools-36.0.1.zip#md5=430eb106788183eefe9f444a300007f0
2. Unzip Setuptools-36.0.1.zip && CD setuptools-36.0.1
3. Python setup.py Install
4. Easy_install pip
http://blog.csdn.net/shaojunbo24/article/details/52300428
http://blog.csdn.net/ab198604/article/details/8681851
http://blog.csdn.net/laiahu/article/details/6903100
http://blog.csdn.net/shanliangliuxing/article/details/18499625
CentOS python2.6 upgrade to python2.7