CentOS Installation python2.7

Source: Internet
Author: User

---restore content starts---

centos6.5 bring python2.6, due to work needs, another installed python2.7, reference on-line information, collation as follows

1.sudo Yum Install gcc gcc-c++

2.wget HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/2.7.8/PYTHON-2.7.8.TAR.XZ

3.xz-d PYTHON-2.7.8.TAR.XZ

Tar Python-2.7.8.tar

CD Python-2.7.8

4../configure--prefix=/usr/local/python27 Be sure to specify prefix, otherwise the installation path conflicts with your own Python2.6

5.make && make Install

6.mv/usr/bin/python/usr/bin/python26 Rename the Python2.6 soft connection

7.mv/usr/local/python27/bin/python27 /usr/bin/python

The Python2.7 is installed, and the input python-v displays the Python 2.7.8.

But because of the soft connection of a new Python command, other software that relies on python2.6 will not be available, and Yum, for example, needs to be changed/usr/bin/yum

Point to the PYTHON26 you backed up in step 6, which is the first line #! /usr/bin/python26

Complete. Novice

---restore content ends---

CentOS Installation python2.7

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.