自动化运维之从Python2.6 升级Python2.7 开发环境

1, download Python2.7

1
    wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz

 

2, 解压Python 2.7 并安装

1
2
3
4
    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 

1
2
3
    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, 安装相关工具

1
2
3
4
    tar -xzvf setuptools*.tar.gz
    cd setuptools*
    python2.7 setup.py build
    python2.7 setup.py install
1
2
3
4
5
    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
1
2
3
    pip-2.7 freefz > requirest.txt
 
    pii install -r requirest.txt
上一篇:Spring Boot(10)——使用Redis


下一篇:Sass安装演示