Upgrade to Python 2.7.9 on CentOS5.5

1. Install python2.7

#cd /tmppython

#wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz --no-check-certificateweb

#tar zxvf Python-2.7.9.tgzbootstrap

#cd Python-2.7.9app

#./configurepython2.7

#makecurl

#make installwebapp

2. Setup python2.7 as default python

#cd /usr/binurl

#mv python python.bakspa

#ln -s /usr/local/bin/python2.7 ./pythonip

3. Define the old version python2.4 for yum

#vi /usr/bin/yum

#change 「#!/usr/bin/python」 to 「#!/usr/bin/python2.4」

 

4. Install setuptools 15.2 (easy_install)

#wget https://pypi.python.org/packages/source/s/setuptools/setuptools-15.2.zip --no-check-certificate

#unzip setuptools-15.2.zip

#cd setuptools-15.2

#python setup.py install

5. Update system CAcert (for CentOS5.5 only)

#wget http://curl.haxx.se/ca/cacert.pem

#mv cacert.pem ca-bundle.crt

#mv ca-bundle.crt /etc/pki/tls/certs

6. Install & Update pip

#easy_install pip

#wget https://bootstrap.pypa.io/get-pip.py

#python get-pip.py

#pip install --upgrade pip

#pip install -U pip

#pip install --upgrade setuptools

#pip install requests

#pip install webapp2

相關文章
相關標籤/搜索