首页 > 代码库 > Centos6.5_X86_64安装python2.7

Centos6.5_X86_64安装python2.7

1.下载python2.7源码包:https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
2.安装编译环境:yum  groupinstall  "Development Tools"
3.解压,编译安装
#tar  zxvf Python-2.7.8.tgz
#cd  Python-2.7.8
#最后编译安装:
#./configure  
#make && make install
cp -rf  /usr/local/bin/python2.7    /usr/bin/python
注意:
若使用yum时候报错,检查下/usr/bin/yum头一行的解释python是哪个版本,更改python2.6即可

Centos6.5_X86_64安装python2.7