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

Python源码安装

时间:2016-08-09 19:06:17      阅读:432      评论:0      收藏:0      [点我收藏+]

标签:

python2.7.12和python3.5.2安装指导

系统centos6.5

 

下载地址:
https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz h或者
https://python.org/ftp/python/3.5.2/Python-3.5.2.tgz

 


需要的包:

yum install openssl openssl-devel gdbm gdbm-devel gcc gcc-c++ bzip2 bzip2-devel lzma xz-devel xz-compat-libs ncurses ncurses-devel sqlite sqlite-devel readline readline-devel tk tk-devel


不需要安装:
bsddb185: Older version of Oracle Berkeley DB. Undocumented. Install version 4.8 instead.
dl: For 32-bit machines. Deprecated. Use ctypes instead.
imageop: For 32-bit machines. Deprecated. Use PIL instead.
sunaudiodev: For Sun hardware. Deprecated.
_tkinter: For tkinter graphy library, unnecessary if you don‘t develop tkinter programs.

 

 

python2.7.X

创建目录:
mkdir /usr/local/Python-2.7.12

配置:
./configure --prefix=/usr/local/Python-2.7.12
make
make install

 


python3.5.2

创建目录:
mkdir /usr/local/Python-3.5.2/

创建安装:
mkdir debug
cd debug
../configure --prefix=/usr/local/Python-3.5.2/ --with-pydebug
make
make install

 


测试某些模块是否可行:
./python -m test -v test_readline

./python -m test -v test_locale


问题:
python3.5编译出错

./python -m test -v test_readline

bug未修复:
https://bugs.python.org/issue19884

 

Python源码安装

标签:

原文地址:http://www.cnblogs.com/Tom-Idea/p/4480327.html

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