Installation of CentOS installation update Python2.7 and PIP

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.