Python Upgrade in Ubuntu (reprint)

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/menglin8908/article/details/16822171

The python version built in ubuntu12.04 is 2.7.3 and recently wanted to update Python to 2.7.6. The update steps are as follows

1. Download

Download the python2.7.6 installation package on the Python website http://www.python.org/getit/

2. Unzip

TAR-ZVF python-2.7.6.tgz

3. Compiling the installation

CD Python-2.7.6

./configure

Make

Make install (requires root access)

Python default installation directory in/usr/local/lib/python2.7, you can view the version number by/usr/local/bin/python-v

4. Change the system default version

sudo rm/usr/bin/python

sudo ln-s/usr/local/bin/python2.7/usr/bin/python

This way, the default version shown in the terminal input Python is 2.7.6.

Python Upgrade in Ubuntu (reprint)

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.