问题描述:“Can’t connect to HTTPS URL because the SSL module is not available.”
出现import requests 提示"Can't connect to HTTPS URL because the SSL module is not available."
以及pip install XXX 或者conda upgrade conda 等都无法正常运行,并出现提示"pip is configured with locations that require TLS/SSL"
总的来说就是SSL模块出现问题,但是我以及安装了openssl库。
本人环境:anaconda3 + python3.7 + win10
查阅资料总结
1.环境变量没有处理好
在安装anaconda时应该选择加入环境变量。本人在安装时选的just me ,没有选择添加anaconda的环境变量,时候添加了anaconda的三个环境变量后,依旧有问题。
2.SSL模块的缺失
重新下载安装。但是我以及由openssl的库。
3.将openssl库的位置添加到环境变量,并上移置顶最好
去anaconda的pkgs中找到openssl的位置,比如我的D:\ProgramData\Anaconda3\pkgs\openssl-1.1.1c-he774522_1\Library\bin
,将其添加到环境变量中。
成功方法小结
我在添加完anconda的环境变量后(三条变量,自行百度),再次添加模块openssl的位置到环境变量中,就可以了。(前提是你也安装了openssl模块)