How to upgrade python2.6.6 to python2.7.x

Source: Internet
Author: User
This article mainly introduces how to upgrade python2.6.6 to python2.7.x. it is very good and has reference value. if you need it, you can refer to it. 1. download python2.7.x

Wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz

2. decompress and compile and install

Tar-zxvf Python-2.7.6.tgz & cd Python-2.7.6 &./configure & make all & make install & make clean & make distclean

3. Check installation

/Usr/local/bin/python2.7-V

4. create a soft connection and point

Mv/usr/bin/python/usr/bin/python2.6.6

Ln-s/usr/local/bin/python2.7/usr/bin/python

5. check

Python-V

6. notes for using yum

After the system Python soft link points to Python 2.7, yum cannot work properly because yum is incompatible with Python. we need to specify the Python version of yum.

Vim/usr/bin/yum: add the header #! /Usr/bin/python #! /Usr/bin/python2.6.6 (just backed up)

The above section describes how to upgrade python 2.6.6 to python 2.7.x. I hope it will help you. if you have any questions, please leave a message, the editor will reply to you in a timely manner. I would like to thank you for your support for the script home website!

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.