使用anaconda在Pycharm当中创建虚拟环境时报如下错误
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
‘SSLError("Can‘t connect to HTTPS URL because the SSL module is not available.",)
问题原因
1.缺少openssl
解决方案:安装winopenssl测试环境,直接下载第一行exe大小为3m左右的安装包(测试版)
下载地址
https://slproweb.com/products/Win32OpenSSL.html
安装好openssl之后,如果import ssl还报错,可以重新安装python3.7
2.pip版本太低
解决方案:更新pip
python -m pip install --upgrade pip
3.出现该问题的原因
可能之前是win10 1809(更新win10 1803)后,一直出现服务Cryptographic Services占用过大,该服务与证书有关,导致除了edge浏览器可以上网,其他第三方浏览器必须关闭该服务才可以上网,后来使用强制修复工具修复
参考
https://blog.csdn.net/marueibo/article/details/86678936