Think before you speak, read before you think.

centos6 python升级2.6.6至2.7.3

操作步骤

yum install gcc openssl openssl-devel -y
curl -O https://www.python.org/ftp/python/2.7/Python-2.7.tgz
tar xzf Python-2.7.tgz
cd Python-2.7
./configure
make &&  make install

修改 /usr/bin/yum 第一行为 #!/usr/bin/python2.6

安装对应的 easy_install

curl -O https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *