centos和readhat下安装python2.7

时间:2014-04-30 04:58:42   收藏:0   阅读:400

1、安装基本库
yum install gcc
yum install make
yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel

2、获得python2.7.4
wget http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2

3、解压 tar xf Python-2.7.4.tar.bz2

4、配置 cd Python-2.7.4 ./configure

5、生成&安装 make make install

6、默认安装的是Python2.4,需要修改为2.7 ln -sf /usr/local/bin/python2.7 /usr/local/bin/python

7、重进shell python -V

centos和readhat下安装python2.7,码迷,mamicode.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!