sed -ri 's/^#readline/readline/' Modules/Setup.dist sed -ri 's/^#(SSL=)/\1/' Modules/Setup.dist sed -ri 's/^#(_ssl)/\1/' Modules/Setup.dist sed -ri 's/^#([\t]*-DUSE)/\1/' Modules/Setup.dist sed -ri 's/^#([\t]*-L\$\(SSL\))/\1/' Modules/Setup.dist
开始编译安装
1 2
./configure --enable-shared --prefix=/usr/local/python3 make -j 2 && make install
$ python3 Python 3.6.3 (default, Dec 17 2017, 04:11:01) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux Type "help", "copyright", "credits" or "license"for more information. >>> print('qf') qf >>> exit()
输入 exit() 即可退出 python3
测试 pip3
一般情况下你不需要执行下面的安装命令。
1 2
[root@newrain ~]# pip3 -V pip 9.0.3 from /usr/local/lib/python3.6/site-packages (python 3.6)