centos7 python 升级到3.7 编译安装
先卸载python3.6
yum remove python3
yum install gcc zlib* libffi-devel -y
到一个地方
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar -xzvf Python-3.7.0.tgz
cd Python-3.7.0.tgz
vim /Module/Setup.dist文件, 否则不支持ssl 来自:https://www.jianshu.com/p/73f19cb92ab4
# line: 207
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
./configure && make && make install