赞
踩
最近使用conda create环境时遇见下面错误,Ubuntu和Windows都会遇到:
- Collecting package metadata (current_repodata.json): failed
-
- CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-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/linux-64'
这是很坑的,我折腾了好久发现防火墙没关闭!!!
Windowns直接搜索.condarc进行编辑,Ubuntu则使用下面命令编辑:
vi ~/.condarc
直接把下面内容复制粘贴:
- channels:
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- show_channel_urls: true
- ssl_verify: false
但是windows下有时候还是有问题,尝试将https改为http就没问题了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。