CentOS6.5 Binary Package Upgrade Python

Source: Internet
Author: User

Upgrade comes with 2.6.6 Version to 2.7.12

1. Download the decompression PYTHON-2.7.12.TAR.XZ

xz -d Python-2.7.12.tar.xztar -xvf Python-2.7.12.tar

2. Install the following dependencies, if necessary, or resolve dependencies based on compilation

yum -y updateyum‘development tools‘yum -y install zlib-devel bzip2-devel openssl-devel xz-libs wget ncurses-devel

3. Install Python

cd Python-2.7.12./configure --prefix=/usr/local/pythonmakemake#altinstall可以避免安装时创建任何软连接

4. Establish a connection

mv /usr/bin/python{,.old}ln -s /usr/local/python/bin/python2.7 /usr/bin/python

5. Install Pip and Setuptools

Download get-pip.py, download link in pypi setuptools installation documentation

python get-pip.pymv /usr/bin/pip{,.old}ln -s /usr/local/python/bin/pip /usr/bin/pipmv /usr/bin/easy_install{,.old}ln -s /usr/local/python/bin/easy_install /usr/bin/easy_install

6. Fix Yum, modify/usr/bin/yum

#!/usr/bin/python #修改前#!/usr/bin/python.old #修改后

Eof

CentOS6.5 Binary Package Upgrade Python

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.