码迷,mamicode.com
首页 > 编程语言 > 详细

python2.6升级到2.7

时间:2015-05-08 00:15:06      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:python2.6升级到2.7

#1 安装相关包
yum -y install gcc gcc-c++ gd cmake patch  automake make autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libtools-libs libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers pcre-devel libmcrypt-devel
readline-devel libcap-devel

#2 python安装
cd /application/tools
wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar zxf Python-2.7.8.tgz
cd Python-2.7.8
mkdir /usr/local/python2
./configure --prefix=/usr/local/python2
make && make install
echo $?
mv /usr/bin/python /usr/bin/python_old
ln -s /usr/local/python2/bin/python2 /usr/bin/python
python

#3 解决下yum

vi /usr/bin/yum
#!/usr/bin/python2.6

本文出自 “技术屌丝” 博客,谢绝转载!

python2.6升级到2.7

标签:python2.6升级到2.7

原文地址:http://yeqing.blog.51cto.com/3159086/1643972

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!