本文共 1031 字,大约阅读时间需要 3 分钟。
来自: http://bicofino.io/blog/2014/01/16/installing-python-2-dot-7-6-on-centos-6-dot-5/ yum -y updateyum groupinstall -y 'development tools' yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wgetwget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xzxz -d Python-2.7.8.tar.xztar -xvf Python-2.7.8.tarcd Python-2.7.8 ./configure --prefix=/usr/local --with-zlib=/usr/include/ make make install #安装setuptoolswget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz tar xvf setuptools-1.4.2.tar.gzcd setuptools-1.4.2 python2.7 setup.py install --record install.log # 安装PIPcurl https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python2.7 -#或者easy_install2.7 pip #安装ipython pip2.7 install ipython #ipython tab支持 yum install ncurses ncurses-develpip2.7 install Readline#安装虚拟环境工具pip2.7 install virtualenv #修改yum /usr/bin/python2.6#另外的方法# yum update# yum install centos-release-SCL# yum install python27
转载于:https://blog.51cto.com/gbsnaker/1713457