CondaHTTPError: HTTP 000 CONNECTION FAILED for url和conflicts

在anaconda prompt安装tensorflow时,出现以下错误

(base) C:\Users\Eiffel>conda create -name tensorflow python=3.9.6
Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64/current_repodata.json>
Elapsed: -

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.
'https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64'

网上的方法是清华的镜像用http而不是https等等,但还是没用。
后来试了好久才发现是我架了梯子,后来关掉翻墙软件就好了,但是出现了如下问题:conflicts
在这里插入图片描述
网上的解释是

It should also be mentioned that python 3.9 is brand new and it is only the interpreter. For this to be of much use, a whole sub-ecosystem of packages must be built out. Conda-forge are forging ahead with that at present. Until the packages you need are rebuilt against 3.9.0, you will not be able to update to 3.9.0.

链接:https://github.com/conda/conda/issues/10267
我就把python版本改成了3.8,也不行,最后改成3.7就好了

conda create -name tensorflow python=3.7

安装成功

正确方法:使用如下命令

conda install -c conda-forge ipykernel

在这里插入图片描述
再使用如下命令(不知道是干嘛的)此处参考的是https://www.coder.work/article/7569604的回答

python -m ipykernel install --user --name vanilla --display-name "Python 3 (vanilla)"

conda create -name tensorflow python=3.9.6即可(我的python的版本是3.9.6)
在这里插入图片描述

附:另外,增加、删除channel的命令

conda config --add channels ×××(网址)
conda config --remove channels ×××(网址)

查看channel

conda config --show channels
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值