在jupyter notebook中使用安装好的pytorch

已经新建一个安装好pytorch的虚拟环境,在jupyter notebook中不能使用
查询到的解决方法:
在jupyter notebook中使用安装好的pytorch_第1张图片
期间会有询问,输入y
在jupyter notebook中使用安装好的pytorch_第2张图片
下载安装成功显示如下:
在jupyter notebook中使用安装好的pytorch_第3张图片
运行jupyter notebook
在jupyter notebook中使用安装好的pytorch_第4张图片
在jupyter notebook中使用安装好的pytorch_第5张图片
选择Python [conda env:torch]
注:我的pytorch安装在名为torch的虚拟环境中
输入测试代码运行,不报错即为安装成功。
在jupyter notebook中使用安装好的pytorch_第6张图片
附:anaconda中安装pytorch教程:https://blog.csdn.net/MY_Azure/article/details/109749348

你可能感兴趣的:(Python,python,anaconda,pytorch)