Centos6.4 on python2.6.6 upgrade to 2.7.6

Source: Internet
Author: User

Long time not to write blog, this article has no gold content, just make a record. Easy to read in the future.


0. Operating System Information

[Email protected] ~]$ cat/etc/issue

CentOS Release 6.4 (Final)

Kernel \ r on an \m



1. Current Python version information

[Email protected] bin]$ pwd

/usr/bin

[[email protected] bin]$ ll-a python

-rwxr-xr-x. 2 root root 4864 February python

[[email protected] bin]$ python

Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2

Type "Help", "copyright", "credits" or "license" for more information.

>>>



2. Delete the current Python

[[email protected] bin]$ sudo rm-rf python



3. Download and install the 2.7.6 installation package

[email protected] download]$ ll python-2.7.6.tgz

-rw-r--r--1 vagrant vagrant 14725931 May python-2.7.6.tgz


[[email protected] python-2.7.6]$./configure && make && sudo make install



4. Making a soft connection point python2.7.6 to Python

[[email protected] bin]$ sudo ln-s/usr/local/bin/python2.7 python


[Email protected] bin]$ pwd

/usr/bin

[[email protected] bin]$ ll python

lrwxrwxrwx 1 root root 24 February 14:29 python --/usr/local/bin/python2.7


OK, now the Python environment is switched to 2.7.6.

[[email protected] ~]$ python

Python 2.7.6 (default, Feb 14 2015, 14:13:13)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2

Type "Help", "copyright", "credits" or "license" for more information.

>>>


Centos6.4 on python2.6.6 upgrade to 2.7.6

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.