python升级

来源:互联网 发布:十大数据公司 编辑:程序博客网 时间:2024/05/10 10:36
centos5.5 默认是2.4的python ,想用2.7,就升级
1.先安装GCC(如果有的就不用了)
yum -y install gcc
2.下载Python-2.7.2
[root@localhost ~]# wgethttp://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
3.解压Python-2.7.2

[root@localhost ~]# tar -jxvf Python-2.7.2.tar.bz2
4.进入刚解压后的文件夹(可使用命令):

[root@localhost ~]# cd Python-2.2.2
5.安装

[root@localhost Python-2.7.2]# ./configure
[root@localhost Python-2.7.2]# make all
[root@localhost Python-2.7.2]# make install
[root@localhost Python-2.7.2]# make clean
[root@localhost Python-2.7.2]# make distclean
注:如果提示不存在make命令的话,说明没有安装make包,使用yum –y install make安装一下即可。 到此结束
原创粉丝点击