报错及解决:Kernel does not exist: 96b59d42-d81e-471c-8ef9-63a61a963a16

在pycharm的terminal终端中,首次启动jupyter notebook,成功。中断之后重启,运行cell的时候找不到kernels,系统报错如下

(topvenv)..../feature190919>jupyter notebook
[I 11:11:59.261 NotebookApp] Serving notebooks from local directory: ..../feature190919
[I 11:11:59.261 NotebookApp] The Jupyter Notebook is running at:
[I 11:11:59.261 NotebookApp] http://localhost:8888/?token=...
[I 11:11:59.262 NotebookApp] or http://127.0.0.1:8888/?token=...
[I 11:11:59.262 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 11:15:08.362 NotebookApp] No session ID specified
[W 11:15:08.362 NotebookApp] 404 GET /api/kernels/96b59d42-d81e-471c-8ef9-63a61a963a16/channels (127.0.0.1): Kernel does not exist: 96b59d42-d81e-471c-8ef9-63a61a963a16
[W 11:15:08.369 NotebookApp] 404 GET /api/kernels/96b59d42-d81e-471c-8ef9-63a61a963a16/channels (127.0.0.1) 9.02ms referer=None
[I 11:21:39.267 NotebookApp] Interrupted...
[I 11:21:39.268 NotebookApp] Shutting down 0 kernels

解决方案:
找到这个runtime目录,全部清空,重启jupyter就可以了

在这里插入图片描述
下面是我对这个错误的分析和解决思路
我直接把token的参数填了密码导致了本次错误

观察该目录,一启动jupyter notebook就生成了这三个文件

在这里插入图片描述
用记事本打开nbserver-2280.json文件,会发现123456并没有进入到password字段中,而是被放入到了token字段。这个时候在pycharm中点击
在这里插入图片描述
这时候会重新提示输入密码
输入密码之后保存就对了。

你可能感兴趣的:(python,机器学习)