anaconda安装pytorch报错:(Caused by SSLError(“Can‘t connect to HTTPS URL because the SSL module is not av

anaconda安装pytorch报错:

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.

Exception: HTTPSConnectionPool(host=‘conda.anaconda.org’, port=443): Max retries exceeded with url: /pytorch/win-64/current_repodata.json (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”))
在这里插入图片描述

解决办法:

设置清华镜像

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

若需换回默认官网镜像源

conda config --remove-key channels

设置环境变量

增加几个anaconda路径,在系统变量path加入 anaconda路径 为

D:\anaconda3
D:\anaconda3\Scripts
D:\anaconda3\Library\bin

D:\anaconda3 为 anaconda 安装路径

ddl查找错误

参考: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
在这里插入图片描述
复制之后即可解决问题。如果不行的话,可能就是别的错误了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Roc.lp

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值