这篇文章主要介绍“Jupyter notebook中怎么添加Pytorch运行环境”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“Jupyter notebook中怎么添加Pytorch运行环境”文章能帮助大家解决问题。

1.打开Anaconda中的Anaconda Navigator

如下所示:

Jupyter notebook中怎么添加Pytorch运行环境

2.修改channel环境

如下红框所示:

Jupyter notebook中怎么添加Pytorch运行环境

3.找到Jupyter Notebook的位置

点击Install,图中因为已经安装,所以是Launch,当没有下载过时,状态为Install

如下所示:

Jupyter notebook中怎么添加Pytorch运行环境

4.重启Jupyter Notebook

选择合适虚拟环境的jupyter notebook打开。

输入import torch,如果还是显示下面结果:

Jupyter notebook中怎么添加Pytorch运行环境

在jupyter notebook界面输入conda list,观测给出的列表中是否存在torch模块

如下所示:

Jupyter notebook中怎么添加Pytorch运行环境

如果没有存在torch模块,则通过pip重新安装已经下载好的torch-1.4.0-cp37-cp37m-win_amd64.whltorch-1.4.0-cp37-cp37m-win_amd64.whl,这样就能使用torch了

具体操作如下所示:

Jupyter notebook中怎么添加Pytorch运行环境

关于“Jupyter notebook中怎么添加Pytorch运行环境”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注***行业资讯频道,小编每天都会为大家更新不同的知识点。

相关文章:

  • 2021-04-01
  • 2021-03-31
  • 2021-07-14
  • 2022-12-23
  • 2021-04-04
  • 2021-07-09
  • 2021-08-13
猜你喜欢
  • 2021-12-01
  • 2021-04-14
  • 2022-12-23
  • 2021-04-08
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案