Centos python upgrade

Source: Internet
Author: User
Centos5.7 comes with python version 2.4, which can be upgraded to 2.7 through source code compilation and installation. The source code can be downloaded from the official python website. after downloading and unzipping the source code, run :. /configuremakeallmakeinstallmakecleanmakedistclean is not surprising. you should be able to see the python2.7 file in/usr/local/bin/, which means 2.7 is successfully installed. The next step is

Centos5.7 comes with python version 2.4, which can be upgraded to 2.7 through source code compilation and installation. You can download the source code from the official python website. download and unzip the source code and run the following command:

./configuremake allmake installmake cleanmake distclean

The Python 2.7 File is displayed in/usr/local/bin/, indicating that the installation is successful. The next step is to enable the system to use 2.7 by default through soft links. The operation is as follows:

mv /usr/bin/python /usr/bin/bak_pythonln -s /usr/local/bin/python2.7 /usr/bin/python

Now, the upgrade is complete. However, because yum uses python 2.4, all yum instances are unavailable. to solve this problem, you only need to modify the/usr/bin/yum file, put the first line #! Replace/usr/bin/python #! /Usr/bin/python2.4.


Related Article

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.