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

Linux python 配置

时间:2015-06-01 01:02:03      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:linux   python   版本号   

  • 到官方网站下载源码。比如:

    wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz

  • 解压源码包

    tar -zxvf Python-2.7.8.tgz

  • 编译

    cd Python-2.7.8 ./configure --prefix=/usr/local #指定了目录,如果不制定,可以使用默认的,直接运行 ./configure 即可。 make&&sudo make install

安装好之后,进入shell,输入python,会看到如下:

qw@qw-Latitude-E4300:~$ python
Python 2.7.6 (default, Nov 13 2013, 19:24:16)   #后来我升级到2.7.8了,就是用后面讲到的源码安装方法
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

我用的是python2.7.6,或许你的版本号更高。这些差别就不用纠结了。


Linux python 配置

标签:linux   python   版本号   

原文地址:http://10258476.blog.51cto.com/10248476/1656921

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