解决方案_ Jupyter Notebook 启动 Kernel 错误
错误提示
KernelRestarter: Restart Failed .
[W 11:21:52.854 NotebookApp] Kernel dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91 died, removing from map.
[W 11:22:37.829 NotebookApp] Timeout waiting for kernel_info reply from dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91
[E 11:22:37.830 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91)
[W 11:22:39.005 NotebookApp] 404 GET /api/kernels/dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91/channels?session_id=d3bc9e9a9eeb49d28d03670906b22c40 (::1): Kernel does not exist: dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91
[W 11:22:39.012 NotebookApp] 404 GET /api/kernels/dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91/channels?session_id=d3bc9e9a9eeb49d28d03670906b22c40 (::1) 9.02ms referer=None
[W 11:22:42.013 NotebookApp] Replacing stale connection: dfe5095a-6cdc-4bf1-93a6-3ab2f9b7cc91:d3bc9e9a9eeb49d28d03670906b22c40
[I 11:23:38.023 NotebookApp] Saving file at /Untitled Folder/test.ipynb
解决方案
打开终端,输入下面的指令:
pip install --upgrade ipykernel
将其升级即可正常运行。虽然它会提示你 prompt-toolkit 的版本应该在1.0到2.0之间,但是这并不影响 Jupyter Notebook 的运行,在升级过程中,主要更新的模块就是 prompt_toolkit,原因是 prompt_toolkit 模块的版本过低导致。
参考链接:
https://blog.csdn.net/WSNBB_hcyfyj/article/details/100096992