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