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