pytorch部署到jupyter中的问题及解决方案
作者:henu-于笨笨 时间:2021-10-05 07:00:27
pytorch部署到jupyter中
在安装Aconda的同时,会将jupyter notebook一起安装,不过这里的jupyter notebook是base中的jupyter notebook二不是pytorch中的jupyter notebook,因此并不能在此jupyter notebook运行torch包。
base中的jupyter:
两种解决方案
一、base中重新安装pytorch
二、pytorch中安装jupyter notebook
这里选择第二种方法
首先
conda activate pytorch
进入到pytorch环境中去
在pytorch环境中看包
conda list
没有我们需要的包,因此输入命令,进行下载jupyter
conda install nb_conda_kernels
进行下载
下载完成后输入命令:
jupyter notebook
打开jupyter notebook
注:我再输入的时候出现了一些无法定位的提示,但是我的电脑没有影响使用jupyter,还是可以使用jupyter并且可以import torch
点击确定,就可以来到jupyter notebook的页面了
让我们来验证一下
来源:https://blog.csdn.net/weixin_45527999/article/details/124574230
标签:pytorch,jupyter
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
如何实现固定长度的自动编号?
2010-06-03 10:08:00
Python实现获取乱序列表排序后的新下标的示例
2021-04-25 10:36:42
python+flask编写接口实例详解
2022-10-09 16:09:41
![](https://img.aspxhome.com/file/2023/0/68930_0s.png)
Python 如何写入Excel格式和颜色
2023-03-10 20:49:55
![](https://img.aspxhome.com/file/2023/7/86687_0s.jpg)
Anaconda和Pycharm的安装配置教程分享
2022-10-22 07:12:30
![](https://img.aspxhome.com/file/2023/6/90916_0s.png)
Python项目 基于Scapy实现SYN泛洪攻击的方法
2023-01-15 01:34:30
![](https://img.aspxhome.com/file/2023/8/88928_0s.jpg)
Python3中常用的处理时间和实现定时任务的方法的介绍
2022-05-13 09:25:25
教你用python控制安卓手机
2023-11-10 10:13:39
![](https://img.aspxhome.com/file/2023/4/69554_0s.png)
Python 面向对象部分知识点小结
2023-08-22 17:10:09
![](https://img.aspxhome.com/file/2023/4/91924_0s.png)
python变量赋值方法(可变与不可变)
2021-02-14 08:51:55
![](https://img.aspxhome.com/file/2023/9/69559_0s.jpg)
Python常见数据结构详解
2021-10-28 22:07:33
python文件处理笔记之文本文件
2022-10-30 22:38:32
![](https://img.aspxhome.com/file/2023/1/93841_0s.png)
用JS访问操作iframe框架里的dom
2008-11-10 13:05:00
![](https://img.aspxhome.com/file/UploadPic/200811/10/1-55s.gif)
python使用socket进行简单网络连接的方法
2021-05-16 22:53:03
Python3 使用map()批量的转换数据类型,如str转float的实现
2023-07-15 10:35:03
DataFrame.to_excel多次写入不同Sheet的实例
2022-03-26 01:20:14
设计MySQL数据库的技巧
2009-09-06 11:56:00
![](https://img.aspxhome.com/file/UploadPic/20099/6/20099612300822s.jpg)
深入了解Python的异常处理机制
2023-09-03 09:25:41
![](https://img.aspxhome.com/file/2023/6/68886_0s.png)
使用Python的Twisted框架编写非阻塞程序的代码示例
2021-01-22 16:20:51
Python xmltodict模块安装及代码实例
2023-05-27 09:25:43