Upgrade python2.6.6 to 2.7.x and python2.6.62.7.x

Source: Internet
Author: User

Upgrade python2.6.6 to 2.7.x and python2.6.62.7.x

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)

 

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.