解决conda安装pytorch时频道没有包和下载长度不够

报错内容①:

failed with initial frozen solve. Retrying with flexible solve.
The following packages are not available from current channels:

解决办法:重新配置镜像源

看过其他一些博主的文章,其中一些改变镜像源的方式并没有解决问题,原因是镜像源的路径不对。

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

报错内容②:

Downloaded bytes did not match Content-Length.

解决办法:增大conda的timeout时长

有时候改成600结果还是会超时,可以尝试改得更长一些。

conda config --set remote_read_timeout_secs 600.0

你可能感兴趣的:(anaconda,pytorch,深度学习)