gpt4 book ai didi

python - 内核在 jupyter 笔记本中不断死亡

转载 作者:行者123 更新时间:2023-12-03 14:41:59 25 4
gpt4 key购买 nike

每当我启动 jupyter notebook 并创建一个新的 python 3 notebook 时,我都会收到一条错误消息,说内核已死亡。
我已经尝试删除和安装 ipython、python3.6.5 和 jupyter notebook,但我仍然收到错误消息。
我的 cmd 屏幕如下:-

[I 06:46:36.432 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
WARNING:root:kernel 0d0442a9-c92f-46e6-acdd-08ca0a18c5f2 restarted
Traceback (most recent call last):

File "c:\users\user\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)

File "c:\users\user\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)

File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app

File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *

File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\ipykernel\connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir

File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\IPython\__init__.py", line 55, in <module>
from .terminal.embed import embed

File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\IPython\terminal\embed.py", line 17, in <module>
from IPython.terminal.ipapp import load_default_config

File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\IPython\terminal\ipapp.py", line 34, in <module>
from IPython.extensions.storemagic import StoreMagics

**ModuleNotFoundError: No module named 'IPython.extensions'**

[W 06:46:39.450 NotebookApp] KernelRestarter: restart failed

[W 06:46:39.450 NotebookApp] Kernel 0d0442a9-c92f-46e6-acdd-08ca0a18c5f2 died, removing from map.

ERROR:root:kernel 0d0442a9-c92f-46e6-acdd-08ca0a18c5f2 restarted failed!
[W 06:46:39.461 NotebookApp] 410 DELETE /api/sessions/67987236-8755-433a-afcb-e052ccbf65b9 (::1): Kernel deleted before session

**[W 06:46:39.461 NotebookApp] Kernel deleted before session**

[W 06:46:39.461 NotebookApp] 410 DELETE /api/sessions/67987236-8755-433a-afcb-e052ccbf65b9 (::1) 1.00ms

referer=http://localhost:8888/notebooks/Untitled5.ipynb?kernel_name=python3## Heading ##

最佳答案

您可以尝试重新安装 Jupyter,

pip uninstall jupyter
pip install jupyter

然后再试一次,这在我的情况下有效。当我升级到 Ubuntu 18.04 时遇到了这个问题。

也检查这个线程。
https://github.com/jupyter/notebook/issues/1892

关于python - 内核在 jupyter 笔记本中不断死亡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50785665/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com