Ubuntu 12.04 64位 对Python 源代码编译详解
Ubuntu下Python源代码编译
环境:
Ubuntu12.0464位
liaops@AY1306111015016020afZ:/media/data/liaops/download$uname-a LinuxAY1306111015016020afZ3.2.0-29-generic# 46-UbuntuSMPFriJul2717:03:23UTC2012x86_64x86_64x86_64GNU/Linux
下载源代码:
liaops@AY1306111015016020afZ:/media/data/liaops/download$ wgethttp://www.Python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
解压缩:
liaops@AY1306111015016020afZ:/media/data/liaops/download$cdout/ liaops@AY1306111015016020afZ:/media/data/liaops/download/out$tarxvjf../Python-2.7.5.tar.bz2
配置:
liaops@AY1306111015016020afZ:/media/data/liaops/download/out$cdPython-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 Python2.7.5(default,Jun292013,13:03:32) [GCC4.6.3]onlinux2 Type"help","copyright","credits"or"license"formoreinformation. >>>print"HelloWorld!" HelloWorld! >>>1234*4321 5332114 >>>importdatetime >>>printdatetime.datetime.now() 2013-06-2913:29:44.838243 >>>exit() liaops@AY1306111015016020afZ:/media/data/liaops/download/out/Python-2.7.5$
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!