用conda安装软件的标准语法格式为:
$ conda install -c
而pytorch官网中conda给的命令行是这样的,有-c选项,就说明已经制定了下载地址,所以自己配置的镜像源不管用。
![](https://img.php1.cn/3cd4a/94ce/a6e/865776f6fe3d5f59.jpeg)
所以应该把-c pytorch去掉,就可以从镜像源下载文件了。但是貌似有时候下载到的不是最新的,但是可以正常用。
before
package | build
---------------------------|-----------------
cudatoolkit-10.1.243 | h6bb024c_0 347.4 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pytorch-1.4.0 |py3.7_cuda10.1.243_cudnn7.6.3_0 432.9 MB pytorch
torchvision-0.5.0 | py37_cu101 9.1 MB pytorch
------------------------------------------------------------
Total: 789.4 MB
after
The following packages will be downloaded:
package | build
---------------------------|-----------------
_pytorch_select-0.2 | gpu_0 2 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cudatoolkit-10.0.130 | 0 261.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cudnn-7.6.5 | cuda10.0_0 165.0 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl-2019.4 | 243 131.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pytorch-1.3.1 |cuda100py37h53c1284_0 169.0 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
torchvision-0.4.2 |cuda100py37hecfc37a_0 6.4 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
------------------------------------------------------------
Total: 732.8 MB