自动化运维之从Python2.6 升级P
1, download python2.7
wget https://www.Python.org/ftp/python/2.7.9/Python-2.7.9.tgz
2, 解压Python 2.7 并安装
tar -xzvf Python-2.7.9.tgz -C /opt/
cd /opt/Python-2.7.9
./configure --prefix=/usr/local/python2.7
make;make install
3, 安装Python 2.7 安装库工具setuptools,pip
wget Https://pypi.python.org/packages/source/s/setuptools/setuptools-14.3.1.tar.gz
wgethttps://pypi.python.org/packages/source/p/pip/pip-6.0.8.tar.gz#md5=2332e6f97e75ded3bDDDe0ced01dbda3
4, 安装相关工具
tar -xzvf setuptools*.tar.gz
cd setuptools*
python2.7 setup.py build
python2.7 setup.py install
mkdir /usr/local/python2.7/lib/python2.7/site-packages/
tar -xzvf pip-*.tgz
cd pip-*
python2.7 setup.py build
python2.7 setup.py install
pip-2.7 freefz > requirest.txt
pii install -r requirest.txt
相关文章