CENTOS6 default python2.6 Upgrade 2.7 Uninstall python2.6 upgrade 2.7

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/u010098331/article/details/52190354

This article describes the CentOS 6.3 from the Pyhon version is the 2.6 upgrade to 2.7.6 method.

Because older versions of Python in the CentOS system are deeply dependent, you cannot uninstall the original Python, only the new installation.

1. Download Pyhon, select download gzipped source tar Ball (2.7.6) (SIG)

URL https://www.python.org/download/releases/2.7.6

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.3 system Python has been successfully upgraded to 2.7.6 version

Reference:

Http://www.centoscn.com/image-text/config/2015/0325/5005.html

Http://www.cnblogs.com/dudu/p/4294238.html

CENTOS6 default python2.6 Upgrade 2.7 Uninstall 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.