昨天我在检查语句的输出时我的内核死了,它仍然处于相同的状态。当它发生时,我已经编码了至少 4 个小时,而且我没有下载任何应用程序或更改系统内部可能干扰它的任何内容。我已经使用 Jupyter Notebook 一年了,这是第一次发生这种情况。
尝试重启内核时出现以下提示: 内核已死,自动重启失败。内核可能无法重新启动。如果您无法重新启动内核,您仍然可以保存笔记本,但在重新打开笔记本之前,运行代码将不再起作用。
当我尝试运行时: 内核似乎已经死了。它会自动重启。
我做过的事情:
我还运行了以下内容:
conda remove ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils
conda clean -tipsy
conda install ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils
jupyter notebook
到目前为止没有任何效果
我的终端显示如下:
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
/Users/martaramos/Applications/anaconda3/bin/jupyter_mac.command ; exit;
(base) Martaaaa:~ martaramos$ /Users/martaramos/Applications/anaconda3/bin/jupyter_mac.command ; exit;
[I 11:25:26.214 NotebookApp] JupyterLab extension loaded from /Users/martaramos/Applications/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 11:25:26.215 NotebookApp] JupyterLab application directory is /Users/martaramos/Applications/anaconda3/share/jupyter/lab
[I 11:25:26.219 NotebookApp] Serving notebooks from local directory: /Users/martaramos
[I 11:25:26.219 NotebookApp] Jupyter Notebook 6.1.4 is running at:
[I 11:25:26.219 NotebookApp] http://localhost:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
[I 11:25:26.219 NotebookApp] or http://127.0.0.1:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
[I 11:25:26.219 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:25:26.227 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/martaramos/Library/Jupyter/runtime/nbserver-4059-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
or http://127.0.0.1:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
[I 11:25:36.295 NotebookApp] Kernel started: a95fd5dc-468f-4a47-8b16-cb41f585cde1, name: python3
[I 11:25:42.294 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
kernel a95fd5dc-468f-4a47-8b16-cb41f585cde1 restarted
[I 11:26:00.302 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
kernel a95fd5dc-468f-4a47-8b16-cb41f585cde1 restarted
[I 11:27:37.852 NotebookApp] Saving file at /Desktop/Python/Section 6.ipynb