1. 问题描述:准备在Anaconda prompt执行以下命令:
conda install -c stellargraph stellargraph
报错: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.
2. 解决方法:打开 C:\Users\你的电脑名字\.condarc
删除condarc中所有行,复制粘贴以下代码,然后保存:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true
ssl_verify: true
(反正这个文件我用以上代码最后可以成功。不知道大家能不能行了。
3. 重新运行
conda install -c stellargraph stellargraph
- 只要没报错就好(多试几次,可能网不好)。
- 可能Solving environment:\ 会转很久,请耐心等一等。
- 如果想提升速度,最好新建一个虚拟环境再安装软件会快很多。
-
创建一个新环境 (
conda env create -n env_name
)再安装软件,这样就不用考虑与已有的软件的兼容问题了,也可以大大降低搜索空间和提高解析软件依赖的速度。
参考链接: