简体   繁体   English

jupyter 笔记本一直连接到 KERNEL

[英]jupyter notebook keeps CONNECTING TO KERNEL

The Jupyter notebook keeps saying Connecting to kernel , which never reaches finally popping an error, Jupyter notebook 一直在说Connecting to kernel ,它永远不会最终弹出错误,

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.检查您的网络连接或笔记本服务器配置。

So the asterisk on the command line stays forever.所以命令行上的星号会一直存在。

The strange part is, iPython on terminal works FINE.奇怪的是,终端上的 iPython 运行良好。

Here are what I tried:这是我尝试过的:

  1. Change the browser from Chrome to Firefox将浏览器从 Chrome 更改为 Firefox
  2. Change port number into something else than '8888'将端口号更改为“8888”以外的内容
  3. Uninstalled the Jupyter and re-installed it卸载 Jupyter 并重新安装

Anybody with similar issues?有类似问题的人吗?

I had a similar issue.我有一个类似的问题。 It was caused by the tornado-package and I had to downgrade it.这是由 tornado-package 引起的,我不得不降级它。

sudo pip3 uninstall tornado
sudo pip3 install tornado==5.1.1

See Jupyter notebook: No connection to server because websocket connection fails请参阅Jupyter 笔记本:没有连接到服务器,因为 websocket 连接失败

I have found this same issue, and identified it only happens with Chrome standard browser.我发现了同样的问题,并确定它只发生在 Chrome 标准浏览器中。 Incognito Chrome or Firefox does not have the same issue of ipykernel not connecting. Incognito Chrome 或 Firefox 没有 ipykernel 不连接的相同问题。

For now I open jupyter in firefox using the following command from Terminal:现在,我使用终端中的以下命令在 firefox 中打开 jupyter:

jupyter lab --browser Firefox

Not sure what the difference is with the browsers, but recently I have had an issue of not being able to access local files from chrome, so will look into this issue and see if that resolves it for Chrome standard browser.不确定浏览器有什么区别,但最近我遇到了无法从 chrome 访问本地文件的问题,因此将研究这个问题,看看是否可以解决 Chrome 标准浏览器的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM