Python2.6 Upgrade 2.7

Source: Internet
Author: User

CENTOS6 defaults to python2.6 and cannot be uninstalled (because Centos6 depth depends on python), to upgrade to 2.7 can only be upgraded with a new

The operation is as Follows:

1. Download Python2.7

URL https://www.python.org

2. Unzip the installation, the command is as follows

TAR-XVF python-2.7.6.tgz

CD Python-2.7.6

./configure--prefix=/usr/local/python2.7

Make

Make install

3. Create a link to change the system default Python to python2.7

Ln-fs/usr/local/python2.7/bin/python2.7/usr/bin/python

4. View the Python version

Python–v

5. Modify the Yum configuration (otherwise yum will not work)

Vi/usr/bin/yum

Modify the #!/usr/bin/python of the first line to the original Python version address of the system #!/usr/bin/python2.6

This CentOS6 system Python has been successfully upgraded to version 2.7

Python2.6 Upgrade 2.7

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.