首先给出本人成功安装的步骤,遇到问题的朋友,可以参考一下:
1、安装 Anaconda3-5.3.1-Windows-x86_64.exe 记得把路径写进环境变量,并且允许所有用户使用。
2、以管理员角色打开cmd命令行窗口。
3、确保使用conda安装torch,安装命令如下: conda install pytorch-cpu torchvision-cpu -c pytorch
测试:
其他唠叨几句。。。
1、以上过程,我也不知道哪些步骤多余,但这样做确实成功了,具体原因也不是很清楚,可能涉及到win10权限管理等问题。我能想到这样安装的原因,源于该博文。
2、务必记得,在使用conda安装前,不要使用pip方式安装或者实在非管理员角色下安装。这样也能安装成功,但是在引入包的时候却出现找不到torch。(明明已经安装,但就不能引入该包。也有文章指出是包的版本不对,但把主流的几个版本都试了之后,我放弃了)