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

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

你可能感兴趣的:(pip,python2.7,python2.6,pip-2.7)