ubuntu16.04 在虚拟环境中安装pytorch
介绍一种pytorch的一种简单安装方法
首先构建一个虚拟环境,参考文章:https://www.cnblogs.com/lliuye/p/10149932.html
我这里创建的是wyf1
首先检查你的CUDA版本和python版本
![输入cat /usr/local/cuda/version.txt 可查看cuda版本,我这里是9.0](https://img-blog.csdnimg.cn/20191128090011652.png)
![在这里插入图片描述](https://img-blog.csdnimg.cn/20191128092038714.png)
pytorch包的下载
首先进入pytorch的官网:https://pytorch.org/get-started/previous-versions/#linux-and-windows-3
![在这里插入图片描述](https://img-blog.csdnimg.cn/20191128090715921.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDg3ODg2MA==,size_16,color_FFFFFF,t_70)
然后点击对应的CUDA版本网址就可进入下面的界面