Python version upgrade (CentOS) from 2.6.6 to 2.7.6, centos2.7.6

Source: Internet
Author: User

Python version upgrade (CentOS) from 2.6.6 to 2.7.6, centos2.7.6

 

# Install other Dependencies before upgrading
Yum install readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs zlib-devel-y
# Download python installation package wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgztar-zxvf Python-2.7.6.tgzcd Python-2.7.6./configure -- prefix =/usr/local/python2.7make & make installmake cleanmake distclean
# Remove the old Python link mv/usr/bin/python/usr/bin/python2.6.6

Ln-s/usr/local/python2.7/bin/python2.7/usr/bin/python # Install setuptoolscd .. wget http://pypi.douban.com/packages/source/s/setuptools/setuptools-12.0.5.tar.gztar zxvf setuptools-12.0.5.tar.gzcd setuptools-12.0.5python setup. py buildpython setup. py install # manually set the environment variable # vi/etc/profile # Add the following content: # PY_EZ =/usr/local/python2.7 # export PATH = $ PY_EZ/bin: $ PATH # source/etc/profile # The current terminal takes effect, it takes effect only after reboot # echo $ PATH # find easy_install # find/-name easy_install # ln-s/usr/local/python2.7/bin/easy_install/usr/bin/easy_install # easy_install pip # find/-name pip #

 

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.