ananconda环境中,出现SSLError报错

错误描述

在创建ananconda环境过程中出现这个错误:

An HTTP error occurred when trying to retrieve this URL.HTTP errors are often intermittent, and a simple retry will get you on your way.SSLError(MaxRetryError(‘HTTPSConnectionPool(host=‘http://conda.anaconda.org’, port=443): Max retries exceeded with url: /bioconda/linux-64/repodata.json (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”,))’,),)

这个错误的解决方式是参考的这位大佬的文章,这部分错误显示也是拷贝的它的。我的错误提示忘记存留了,不过和他的类似,关键词语 HTTP errors,,,SSLError。

这是原文连接:

关于anaconda环境conda/pip install 报SSL错误问题(有两种情况) - wialsh的文章 - 知乎

解决过程

依据参考文中所讲,有俩种情况我都试了下,依照第二种情况问题解决。

第一种 镜像问题

方式1、添加镜像源,我已经添加过,怕镜像源没写对参照着比对了下,没问题

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/

方式2、将镜像源中的https改为http
不会修改,之间使用添加命令

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

结果不好使,又重新改了回去

conda config --remove channels  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

方式3 将配置中的这一项改为false,方式2和方式3应该是不想使用https中的一个建立连接协议(ssl)
在这里插入图片描述
修改此项为false的方式

conda config --set ssl_verify false

没有解决,改回去

conda config --set ssl_verify True

第二种 镜像问题

​解决方案很简单,就是增加几个 anaconda路径,在系统变量path加入 anaconda路径 为

D:\anaconda3
D:\anaconda3\Scripts
D:\anaconda3\Library\bin
D:\anaconda3 为 anaconda 安装路径

在这里插入图片描述
这里加进去就好,但我没有办法打开这个页面,只能通过dos命令窗口修改。具体修改过程我再新写一篇过程,以供大家参考。链接在这里
通过dos命令窗口查看、修改windows环境变量

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值