pytorch安装报错

在新创建的虚拟环境报错

Posted by 周自横 on August 4, 2020

新建虚拟环境安装pytorch出错

问题描述

我已经在我的base环境中安装了pytorch,在我使用conda新建虚拟环境之后,安装pytorch会显示一下两种奇怪的错误。

image-20200804110639610

python版本为3.6

image-20200804110826099

python版本为3.7,我的base环境也是3.7但是没有安装正常

问题结决

尝试过重新新建虚拟环境以及删除-c不在使用pytorch官方源安装但是一直都不行,之后查到一个帖子,问题描述和我差不多但是下面的唯一一个回答是叫他怎么安装tensorflow-gpu

conda install -c anaconda tensorflow-gpu

然后我尝试按照这种格式,运行了

conda install -c anaconda pytorch torchvision cpuonly

发现的确很有作用