Collecting package metadata (cur
2020-10-23 本文已影响0人
yuanthu
这几天被conda折腾的不要不要, 之前是jupyter 用不了我把anaconda3和jupyter全部卸载了,现在jupyter可以用但是conda在命令行提示符prompt中运行出现如下错误
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/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.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
'https://repo.anaconda.com/pkgs/main/win-64'
百度一下说或许是C:/User/Mars>下的.condarc出了问题, 改成清华镜像没用, 试了一下
conda config --set channel_priority flexible
conda clean -i #清除索引缓存
也没有用, 我都把他删了,才知道冤枉人家了.
用笔记本打开看着.condarc,觉得https没http长得好看, 于是我删除http的后缀s, 只保留http,
channels:
- defaults
show_channel_urls: true
channel_alias: http://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
结果成功了...
image.png
后来翻了翻网页才想起来https 是http+ssl的enhanced http, 只要整一下openssl也可以完成任务. 这个故事告诉我们一个道理: 战士, 编程永远是一个人的裸奔.