Python, 原创,

解决 Can’t connect to HTTPS URL because the SSL module is not available

最近自己安装了 python3.6 和pip3 之后使用 pip3 install https://xxxxx 时候提示

pip._vendor.requests.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.

pip._vendor.requests.packages.urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.

各种 搜索引擎搜索了一遍没有找到合适额解决方案。一个小小的问题花掉了将近3天时间这怎么可以,现在记录下来,希望有所帮助

使用源码安装python3.6的 容易少一些东西

1.首先确保安装了openssl, 有的可能是openssl-devel

2. 编译python3.6 记得加上 –enable-shared

./configure --enable-shared --enable-loadable-sqlite-extensions 

make

make install

3.使用pip3 安装其他模块的时候就没有在报上面的错误了

pip3 install https://wxpython.org/Phoenix/snapshot-builds/linux/gtk3/ubuntu-16.04/wxPython_Phoenix-3.0.3.dev2873+5fec882-cp36-cp36m-linux_x86_64.whl

从上面经验看 如果你是先装了python3.6 而没有安装 openssl 可能导致 安装openssl 后 依然出现上面问题

希望对你有所帮助

 

(7334)

Related Post