进入Anaconda\DLLS目录,查看libssl-1_1-x64.dll的日期
进入Anaconda\Library\bin目录,比较两者日期
如果不一致,将DLLS中的替换bin中的
再次尝试,ok
3.选择pytorch 版本
Run this
Command:conda
install pytorch torchvision cudatoolkit=10.2 -c pytorch
但是直接 conda 会报错,估计墙的原因吧,因此使用清华镜像
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 config --add channels
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
实际操作中一般是寻找.condarc
文件(一般在c盘的桌面文档目录下)
修改成为
最后,运行执行安装pytorch
conda install pytorch torchvision cudatoolkit=10.2
(注意不要 -c pytorch)
运行后搞定,在 anaconda中
找到 pytorch_en点击三角
出现:
open terminal
open terminal with python
就可以运行 pytorch