jupyter notebook连接不上内核

前提

我将虚拟环境添加至jupyter notebook的方法是参考博客如何在conda虚拟环境开启jupyter-notebook或使用指定conda环境作为jupyter-notebook的内核,一键将我创建的虚拟环境添加进了jupyter notebook。我按照上面那篇博客操作过很多次都没有问题,但是这一次在运行一个有pytorch的虚拟环境的时候却出问题了。

problem1

首先我第一个遇到问题就是,jupyter notebook连接不上我虚拟环境的内核,总给我报这个
A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.

我在网上查阅了大量的资料,结果都是说tornado的版本和Jupyter的版本对不上,才会产生上面的问题。

solution1

第一步

我删除了我的nb_conda,执行指令conda uninstall nb_conda

第二步

然后参考Jupyter notebook内使用(添加)虚拟环境中方法二将虚拟环境添加进jupyter notebook的。

第三步

再执行指令conda install tornado==4.5

solution2

或者你刚开始就是参考Jupyter notebook内使用(添加)虚拟环境中方法二将虚拟环境添加进jupyter notebook的。那么你直接执行conda install tornado=4.5即可。

参考博客

如何在conda虚拟环境开启jupyter-notebook或使用指定conda环境作为jupyter-notebook的内核
Jupyter notebook内使用(添加)虚拟环境
jupyter报错AttributeError: type object IOLoop has no attribute initialized
‘IOLoop‘ has no attribute ‘initialized‘ or init() got an unexpected key argument ‘io_loop‘

  • 4
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

布兹学长

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值