[root@bhs Modules]
/root/Python-3.7.4/Modules
vi Setup.dist 文件没如下几行去掉其注释,并且重新编译安装python
_socket socketmodule.c
SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
[root@bhs Python-3.7.4]
Python 3.7.4 (default, Apr 27 2020, 23:47:44)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>>
成功解决问题
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)