CentOS 6.3 on python2.6 upgrade to 2.7

Source: Internet
Author: User

The Python version installed on CentOS 6.3 is 2.6 and does not meet my requirements for running the software, so I upgrade Python.

The latest version of Python is already 3.3, but the compatibility of Python3 may have some problems, so it is more insurance to upgrade to 2.7. Python 2.7 is also capable of meeting most of the software requirements.

Official website Download Python2.7

https://www.python.org/

Dependency Packages

Yum Install zlib* gcc*

TAR-XVF python-2.7.3.tgz
CD Python-2.7.3
./configure--prefix=/usr/local/python2.7
Make
Make Install
once installed, you can run Python to see if it's working.
/usr/local/python2.7/bin/python2.7-v
other articles mention that Python is in the/usr/local/bin directory, but I did not find it, but in the/usr/local/python2.7/bin/.
Next you need to create a link to make the system default Python into python2.7.
Ln-fs/usr/local/python2.7/bin/python2.7/usr/bin/python
Run Python view version
python-v
after making the change, Yum does not run. Modify the/usr/bin/yum file to change the first line of the
#!/usr/bin/python
in Python to the original Python version of the system, my following:
#!/usr/bin/python2.6


This article is from the "XFICC" blog, make sure to keep this source http://xficc.blog.51cto.com/1189288/1566192

CentOS 6.3 on python2.6 upgrade to 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.