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

Centos6.4上python2.6.6升级到2.7.6

时间:2015-02-14 23:53:49      阅读:377      评论:0      收藏:0      [点我收藏+]

标签:python

好久不写博文了,本文没什么含金量,只是做一个记录。便于日后翻阅。


0.操作系统信息

[vagrant@localhost ~]$ cat /etc/issue

CentOS release 6.4 (Final)

Kernel \r on an \m



1.当前python版本信息

[vagrant@localhost bin]$ pwd

/usr/bin

[vagrant@localhost bin]$ ll -a python

-rwxr-xr-x. 2 root root 4864 2月  22 2013 python

[vagrant@localhost bin]$ python

Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> 



2.删掉当前python

[vagrant@localhost bin]$ sudo rm -rf python



3.下载且安装2.7.6安装包

[vagrant@localhost download]$ ll Python-2.7.6.tgz 

-rw-r--r-- 1 vagrant vagrant 14725931 5月  14 2014 Python-2.7.6.tgz


[vagrant@localhost Python-2.7.6]$ ./configure &&  make && sudo make install 



4.制作软连接把python2.7.6指向python

[vagrant@localhost bin]$ sudo ln -s /usr/local/bin/python2.7 python


[vagrant@localhost bin]$ pwd

/usr/bin

[vagrant@localhost bin]$ ll python

lrwxrwxrwx 1 root root 24 2月  14 14:29 python ->/usr/local/bin/python2.7


ok,现在的python环境切换成2.7.6了。

[vagrant@localhost ~]$ python

Python 2.7.6 (default, Feb 14 2015, 14:13:13) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> 


Centos6.4上python2.6.6升级到2.7.6

标签:python

原文地址:http://blog.csdn.net/angel22xu/article/details/43820997

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