ubuntu下python源代码编译
环境:
ubuntu 12.04 64位
liaops@ay1306111015016020afz:/media/data/liaops/download$ uname -a
linux ay1306111015016020afz 3.2.0-29-generic #
46-ubuntu smp fri jul 27 17:03:23 utc 2012 x86_64 x86_64 x86_64 gnu/linux
下载源代码:
liaops@ay1306111015016020afz:/media/data/liaops/download$
wget http://www.python.org/ftp/python/2.7.5/python-2.7.5.tar.bz2
解压缩:
liaops@ay1306111015016020afz:/media/data/liaops/download$ cd out/
liaops@ay1306111015016020afz:/media/data/liaops/download/out$ tar xvjf ../python-2.7.5.tar.bz2
配置:
liaops@ay1306111015016020afz:/media/data/liaops/download/out$ cd python-2.7.5/
liaops@ay1306111015016020afz:/media/data/liaops/download/out/python-2.7.5$ ./configure
编译:
liaops@ay1306111015016020afz:/media/data/liaops/download/out/python-2.7.5$ make
测试:
liaops@ay1306111015016020afz:/media/data/liaops/download/out/python-2.7.5$ ./python
python 2.7.5 (default, jun 29 2013, 13:03:32)
[gcc 4.6.3] on linux2
type “help”, “copyright”, “credits” or “license” for more information.
>>> print “hello world!”
hello world!
>>> 1234 * 4321
5332114
>>> import datetime
>>> print datetime.datetime.now()
2013-06-29 13:29:44.838243
>>>exit()
liaops@ay1306111015016020afz:/media/data/liaops/download/out/python-2.7.5$
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
更多ubuntu 12.04 64位 对python 源代码编译详解相关文章请关注php中文网!