Can‘t connect to HTTPS URL because the SSL module is not available

原文Can‘t connect to HTTPS URL because the SSL module is not available - 关于anaconda中的SSL模块错误_Sky_Tree_Delivery的博客-CSDN博客_anaconda sslerror

问题描述

起因是在使用requests包访问https请求时,出现了SSLError,提示Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”
在这里插入图片描述
根据一些博客设置verify=False,依然无效。
在这里插入图片描述
在尝试通过pip指定安装缺少的包时,也出现了类似的提示。

通过pip install 命令安装包时,出现了

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /simple/ssl/
在这里插入图片描述
或者对于已安装的版本,提示WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
在这里插入图片描述
有些博客通过使用pip3.x指令(如我安装的是3.8.6版本的python,因此使用pip3.8)执行安装,没起作用。

解决方案

原文地址 https://github.com/conda/conda/issues/8273
在这里插入图片描述

大意是:conda找错了openssl的地址,conda在Anaconda\DLLs目录下寻找openssl的dll文件,但实际上需要的dll在Anaconda3\library\bin目录下。因此只需要将这两个文件复制到 Anaconda\DLLs下即可。

根据提示复制两个dll到指定目录。
D:\Anaconda\Library\bin -> D:\Anaconda\DLLs
在这里插入图片描述
不再报错
在这里插入图片描述
同时pip也恢复正常。
在这里插入图片描述

  • 29
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 21
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 21
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值