Linux machine Upgrade Python version to 2.7.13

Source: Internet
Author: User
Background: The newly-applied machine Python version is 2.6 and needs to be manually upgraded to the 2.7.13 version;
Steps:
1 Download the python2.7.13 version of the source package
wget http://python.org/ftp/python/2.7.13/Python-2.7.13.tgz--no-check-certificate

2 Unzip the source package
TAR-XVF python-2.7.13.tgz

3 Compiling the installation
CD Python-2.7.13
./configure--prefix=/usr/local/python2.7
Make && make install

4 Back up the original Python start soft connect
Mv/usr/bin/python/usr/bin/python.old

5 Regenerate soft links to the path of the compiled installation
Ln-s/usr/local/python2.7/bin/python2.7/usr/bin/python

In addition, if you find that ordinary users do not upgrade to python2.7.13, the following steps are required:
Identify the path to the environment variable
Echo $PATH
1 cd/usr/local/bin/
2 unlink Python
3 ln-s/usr/local/python2.7/bin/python2.7 python

Complete, enter the Python check and discover that it has been upgraded to python2.7.13

Linux machine Upgrade Python version to 2.7.13

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.