CentOS Python 2.7 upgrade tutorial

Source: Internet
Author: User
Are you sure you want to install zlib before installation? If not, yuminstallzlibzlib-develwgethttp: // uninstall;

Are you sure you want to install zlib before installation? If not, please install yum install zlib-devel.
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 -- prefix =/usr & make install
(You can also choose not to overwrite the old version, define the installation path, and finally make a soft link)
 
After the installation is complete, you will find that CentOS yum requires the system's built-in version 2.4, which must be changed to yum. otherwise, yum cannot be used.
Vi/usr/bin/yum
1st rows
#! /Usr/bin/python :#! /Usr/bin/python2.4

Install EasyInstall
Wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-p2y2.7.egg
Sh setuptools-0.6c11-p2y2.7.egg
 
After installation, you can directly use the easy_install command to install a third-party Python development kit, for example, easy_install SQLObject.
All are automatically completed, so you do not need to find egg one by one.

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.