CentOS 6.5上安装Python 2.7
在CentOS 6.5上安装Python 2.7过程详解。
1.yum groupinstall “Development tools”
2.安装编译Python需要的组件
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
3.下载并解压最新Python 2.7的源代码
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
tar xf Python-2.7.10.tar.xz
4.编译与安装Python
cd Python-2.7.10
./configure –prefix=/usr/local
make && make install
make clean
make distclean
5.将系统python命令指向Python 2.7
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 /usr/bin/python
6.将yum需要执行的python指定为2.6.6
vi /usr/bin/yum
将文件头部的
#!/usr/bin/python
改成
#!/usr/bin/python2.6.6
下面关于Python的文章您也可能喜欢,不妨看看:
Python 的详细介绍:请点这里
Python 的下载地址:请点这里
相关推荐
huavhuahua 2020-11-20
weiiron 2020-11-16
cakecc00 2020-11-15
千锋 2020-11-15
JakobHu 2020-11-14
guangcheng 2020-11-13
xirongxudlut 2020-11-10
solarLan 2020-11-09
pythonxuexi 2020-11-08
文山羊 2020-11-07
susmote 2020-11-07
wuShiJingZuo 2020-11-05
Pythonjeff远 2020-11-06
jacktangj 2020-11-04
lousir 2020-11-04
YENCSDN 2020-11-17
lsjweiyi 2020-11-17
houmenghu 2020-11-17
Erick 2020-11-17