CenoOS6.6 64位系统默认的Python版本是2.6.6,工作中需要使用Python2.7.10。本文介绍一下Python2.7.10的安装方法。切记:不可覆盖Python2.6.6,小心你的系统不能用了。总的来说安装过程是:Python2.7.10源码安装---->setuptools16.0安装---->pip安装
Python2.7.10源码安装预安装
yum groupinstall "Development tools";yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
Python2.7.10源码安装
cd Python-2.7.10;./configure --prefix=/usr/local;make && make altinstall;ln -s /usr/local/bin/python2.7 /usr/local/bin/python
setuptools16.0安装
unzip setuptools-16.0.zip ;cd setuptools-16.0;python setup.py install
pip安装
easy_install-2.7 pip
时间: 2024-11-08 22:38:13