First, the relevant software to update
Python-v
Yum-y Update
Yum groupinstall-y Development
Yum install-y zlib zlib-dev OpenSSL openssl-devel sqlite sqlite-devel bzip bzip2-devel mysql-devel
Second, install update Python, and modify the relevant configuration information
wget HTTP://MIRRORS.SOHU.COM/PYTHON/2.7.14/PYTHON-2.7.14.TAR.XZ
TAR-XVF PYTHON-2.7.14.TAR.XZ
CD Python-2.7.14
./configure
Make && make Altinstall
mv/usr/bin/python/usr/bin/python2.6.6
Ln-s/usr/local/bin/python2.7/usr/bin/python
Vi/usr/bin/yum (#!/usr/bin/python changed to #!/usr/bin/python2.6.6)
Because Yum relies on Python2.6, it cannot be used after the update, in order to solve this problem, the Yum configuration connection depends on or point to Python2.6, which is equivalent to installing two versions to do different things
Third, install Pip
PIP is installed mainly to facilitate the installation of software later
wget--no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
TAR-XVF setuptools-1.4.2.tar.gz
CD setuptools-1.4.2
Python setup.py Install
Ln-s/usr/local/bin/easy_install-2.7/usr/bin/easy_install
Easy_install pip
Curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python2.7
Because there are a lot of software in use when the 2.7 support is still relatively stable, so this time no use 3.0
3.0 is also the future development trend
Installation of CentOS installation update Python2.7 and PIP