Pytorch安装

故事扮演 提交于 2020-02-28 07:24:41

看Github上面的教程:
https://github.com/fendouai/PyTorchDocs/blob/master/FirstSection/InstallIutorial.md

我是在原本电脑上已经安装了anaconda的情况下安装Pytorch,anaconda 的版本与教程中的版本是不一样的。
1.
step1:查看anaconda 版本
打开 anaconda navigator
在这里插入图片描述
在这里插入图片描述
step2:查看是否设置了环境变量
环境变量有:
F:\Anaconda\anaconda;
F:\Anaconda\anaconda\Library\mingww64\bin;
F:\Anaconda\anaconda\Library\usr\bin;
F:\Anaconda\anaconda\Library\bin;
F:\Anaconda\anaconda\Scripts;
看官方教程是需要粗字体的这三个环境变量
嗯嗯,已经具备了。

在这里插入图片描述
2.安装Pytorch &torchvision
step1:查看自己电脑上的Python版本
是3.7版本,嗯嗯已经具备了。
在这里插入图片描述
step2:进入pytorch 官网,依次根据自己电脑设置选择。
pytorch官网:https://pytorch.org/
我使用conda 来下载:conda:windows+conda+python3.7+None
在这里插入图片描述
step3:拷贝出命令在cmd下----->右键----->粘贴
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
输入y

后面的图为:

在这里插入图片描述
上图中,cpuonly没有安装成功。
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
测试
one:jupter notebook
在这里插入图片描述
新建Python 文件,做一个demo测试:
在这里插入图片描述
two: pycharm
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

成功哈哈哈哈哈~~~~~

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!