pytorch通过默认源下载特别慢。通过添加清华源镜像五分钟不到就能解决,首先添加清华源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
添加完后可以通过conda info 查看镜像
然后打开pytorch官网选择你的配置。配置好了之后pytorch会给你生成一个conda命令。注意:!!!! 不要直接使用这个命令。去掉最后的 -c pytorch。 因为-c pytorch指定从默认镜像安装。删除这个 -c pytorch 才是从清华源下载!