解决安装pytorch时: failed with current_repodata.json, will retry with next repodata source.
首先,这里推荐一个安装的教程,https://zhuanlan.zhihu.com/p/174738684
感觉按照这个方法基本上没问题,但是在新的笔记本上安装又出现的这样的问题,所以记录一下debug的流程。
1.解决方法
bash
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set channel_priority flexible
失败
2.装入国内conda镜像源
# 中科大镜像源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/
# 阿里镜像源
conda config --add channels https://mirrors.aliyun.com/pypi/simple/
# 豆瓣的python的源
conda config --add channels http://pypi.douban.com/simple/
# 显示检索路径,每次安装包时会将包源路径显示出来
conda config --set show_channel_urls yes
conda config --set always_yes True
# 显示所有镜像通道路径命令
conda config --show channels
没有效果,但是首先需要清理掉原本所有的路径
3.conda update --all
尝试了之后并没有太多改变
4 更换更低版本
没有效果
5 换个时间
不知道为什么突然可以下载了,我猜测可能是服务器的问题,在一定的时间ping的很慢,但不能确定之后会不会再出现其他问题,先把这个坑留着