我正在尝试使用 Python 3 内核(检查它是否在 kernelspec 列表中)。
我创建了一个笔记本,并在第一个单元格中print("test")
.
当我执行单元格时,什么也没有发生。我刚看到In[*]
。它似乎永远不会执行。
最终我得到:
Connection failed
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.
这是唯一正在运行的笔记本。我可以看到 Jupyter 仍在终端中运行。
我在 Mac OSX 上运行最新的 Chrome。通过 pip3 安装 Jupyter,通过 Brew 安装 python3。
在 Chrome 控制台中,我看到的唯一错误是:
kernel.js:461 WebSocket connection to 'ws://localhost:8888/api/kernels/b9458856-e8f1-43b1-b91e-c50a9bb637bb/channels?session_id=7ded0972f5ce4517af94f45d6e0e16cf' failed: Error during WebSocket handshake: Unexpected response code: 200
我在终端中看到的唯一错误是:
Warning: coroutine 'WebSocketHandler.get' was never awaited
super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs)
其他一切看起来都很正常。
有什么想法会导致 websocket 返回 200 吗?
Update:笔记本服务器的版本是:5.7.4
服务器运行在这个版本的 Python 上:
Python 3.7.2(默认,2019 年 2 月 12 日,08:16:38)
[铿锵 10.0.0 (clang-1000.11.45.5)]