centos6.5 python2.6 Upgrade 2.7

Source: Internet
Author: User

centos6.5 python2.6 Upgrade 2.7

first, Download python2.7 Source Package

First download the python2.7.3 version to the official website, compile and install

You can also download http://vdisk.weibo.com/s/4CqxR-ZquMs?from=page_100505_profile&wvr=6 on the micro disk

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
Tar zxvf python-2.7.3.tgz
CD Python-2.7.3
./configure
Make && make install

second, then back up the original python, and the python2.7 do a soft connection to the new location

Mv/usr/bin/python/usr/bin/python.bak
Ln-s/usr/local/bin/python2.7/usr/bin/python
Python-v

third, version prompts for 2.7.3
Change Yum to make it work

Vim/usr/bin/yum

four, change the #/usr/bin/python to #/usr/bin/python2.4 so Yum can run normally

Installing Easy_install

Yum Install Python-setuptools

five, then install python-setuptools to pypi website download python-setuptools, version to and Yum time version of the same, otherwise run will Appear:

$ easy_install RSA
Traceback (most recent):
File "/usr/bin/easy_install", Line 5, <module>
From pkg_resources import Load_entry_point
Importerror:no module named Pkg_resources

six, then:

wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c5.tar.gz
Tar zxvf setuptools-0.6c5.tar.gz
CD SETUPTOOLS-0.6C5
Python setup.py Install

Successful installation This makes it easy to use Easy_install to install the Python library.

centos6.5 python2.6 Upgrade 2.7

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.