python 3.6.5 添加ssl 模块

1.下载python 3.6.5后,添加ssl模块,不然后续用到ssl报错;

2. 改下Moudles/Setup

cd  <安装路径>

vi Modules/Setup
#修改结果如下:
# Socket module helper for socket(2)
_socket socketmodule.c timemodule.c

# 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

3.重新走一波节奏

./configure

make && make install

4.python3

>>>import ssl  #检测成功!

>>>

你可能感兴趣的:(python)