Linux Upgrade Python

Source: Internet
Author: User

Centos 6.6 comes with Python 2.6.6 and is now upgraded to 2.7.6

[Email protected] ~]# python-v

Python 2.6.6

The procedure is as follows:

1) Download and unzip the Python 2.7.6 source package

[Email protected] ~]# cd/usr/local/src

[Email protected] ~]# wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz

[Email protected] src]# TAR-ZXVF python-2.7.6.tgz

[Email protected] src]# CD Python-2.7.6

[Email protected] python-2.7.6]# ./configure–prefix=/usr/local/python27

[[email protected] python-2.7.6]# make

[[email protected] python-2.7.6]# make install

2) Backup/usr/bin/python

[Email protected] python-2.7.6]# mv/usr/bin/python/usr/bin/python_old

3) The new Python 2.7.6 soft chain to/usr/bin

[Email protected] python-2.7.6]# ln-s/usr/local/python27/bin/python/usr/bin/python

4) Check the existing Python version

[Email protected] python-2.7.6]# python-v

Python 2.7.6

5) Modify the/usr/bin/yum, otherwise Yum will not be able to use

[Email protected] python-2.7.6]# Vim/usr/bin/yum

#!/usr/bin/python modified to #!/usr/bin/python2.6

6) Modify/usr/bin/yum to verify

[[email protected] python-2.7.6]# yum-y install vim


This article is from the "Laura" blog, be sure to keep this source http://benet1006.blog.51cto.com/9473151/1715820

Linux Upgrade Python

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.