windows下使用pip install出现SSLError的解决办法

在windows下使用pip安装第三方库试,报SSLError,

 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available

 

解决办法:

 

先考虑更换为国内源

C:\Users\用户\xx\AppData\Roaming  这里的xx指代的是你电脑的登录的用户名

进入pip文件夹,创建pip.ini文件,内容如下

 

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com

 

尝试过后,虽然源修改成功了,但是还是报一样的错,接下来需要安装一个文件

 

https://slproweb.com/products/Win32OpenSSL.html

 

 

点击EXE下载安装后,再次尝试,即可成功

 

posted @ 2020-12-14 21:36  听风。  阅读(1896)  评论(0编辑  收藏  举报