python3.6.8安装失败_centos7编译安装Python 3.6.8 后用pip3出现SSL未配置问题(import ssl失败)解决方法...
下載源碼編譯安裝openssl
https://www.openssl.org/source/openssl-1.0.2j.tar.gz
./config --prefix=/usr/local/openssl
./config -t
./make && make install
下載源碼編譯安裝python3.6.8
https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
修改python3.6.8/Modules/Setup.dist文件
修改后為:
204 # Socket module helper for socket(2)
205 _socket socketmodule.c
206
207 # Socket module helper for SSL support; you must comment out the other
208 # socket line above, and possibly edit the SSL variable:
209 SSL=/usr/local/ssl
210 _ssl _ssl.c \
211 -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
212 -L$(SSL)/lib -lssl -lcrypto
213
./configure --prefix=/usr/bin
./make && make install
總結(jié)
以上是生活随笔為你收集整理的python3.6.8安装失败_centos7编译安装Python 3.6.8 后用pip3出现SSL未配置问题(import ssl失败)解决方法...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 下载 嵌入式qt实战教程pdf_Qt之J
- 下一篇: python中continue格式_py