Install or upgrade Python 2.7 and python2.7 in Linux

Source: Internet
Author: User

Install or upgrade Python 2.7 and python2.7 in Linux

1. Prepare the compiling environment gcc

2. Go to the official website to download the python source code of the corresponding version to be installed.

: Https://www.python.org/downloads/source/

You can select the version you want to download and use the wget command to download the corresponding source code.

3. decompress the downloaded code package

12 tar -zxvf Python-x.x.x.tgzcd Python-x.x.x

4. Configuration

1) Search for configure files

12 find . -name configurecd Search results (usually under the root directory of the Python file)

2) Configure

1 ./configure

5. Compile

12 makemake install

(If there are no other special requirements, the installation is over. Input pythonx. x to enter the python development environment you just installed)

6. Replace the default python version (create a new soft connection)

123 cd /usr/bin/rm -rf pythonln -s /usr/local/Python-x.x.x/bin/python ./python

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.