Anaconda 更新后 Jupyter Notebook 死内核

时间:2023-03-23
本文介绍了Anaconda 更新后 Jupyter Notebook 死内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了以下问题.更新 Anaconda 后,因为将 skimage.io 导入 Jupyter Notebook 中的项目时出错,出现了更大的错误 - 死内核.现在我无法启动一个项目,因为 Jupyter 给出了以下错误:

I got the following problem. After update Anaconda because I got an error to import skimage.io to a project in Jupyter Notebook an even a greater error appear - Dead Kernel. Right now I could not ever start a project because the Jupyter gives the following error is:

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://localhost:8888/? 
token=aaf85a5e18489792c87cce65d7a53a0263cd5c08cc7248b 6
[I 00:55:13.451 NotebookApp] Accepting one-time-token-authenticated 
connection from ::1
[I 00:55:31.607 NotebookApp] Kernel started: 608d2190-59e6-4888-b09a- 
e616f67bd5b4
Traceback (most recent call last):
ERROR:tornado.general:Uncaught exception in ZMQStream callback
Traceback (most recent call last):
File "C:Program FilesAnaconda3libsite- 
packageszmqeventloopzmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "C:Program FilesAnaconda3libsite- 
packages	ornadostack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelbase.py", 
line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelbase.py", 
line 233, in dispatch_shell
self.pre_handler_hook()
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelbase.py", 
line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "C:Program FilesAnaconda3libsignal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread  File "C:Program 
FilesAnaconda3lib
unpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)

File "C:Program FilesAnaconda3lib
unpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:Program FilesAnaconda3libsite-packagesipykernel_launcher.py", 
line 16, in <module>
app.launch_new_instance()
File "C:Program FilesAnaconda3libsite- 
packages	raitletsconfigapplication.py", line 658, in launch_instance
app.start()
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelapp.py", 
line 477, in start
ioloop.IOLoop.instance().start()
File "C:Program FilesAnaconda3libsite- 
packages	ornadoplatformasyncio.py", line 112, in start
self.asyncio_loop.run_forever()
ERROR:tornado.general:Uncaught exception in zmqstream callback
Traceback (most recent call last):
File "C:Program FilesAnaconda3libsite- 
packageszmqeventloopzmqstream.py", line 450, in _handle_events
self._handle_recv()
File "C:Program FilesAnaconda3libsite- 
packageszmqeventloopzmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "C:Program FilesAnaconda3libsite- 
packageszmqeventloopzmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "C:Program FilesAnaconda3libsite- 
packages	ornadostack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelbase.py", 
line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelbase.py", 
line 233, in dispatch_shell
self.pre_handler_hook()
File "C:Program FilesAnaconda3libsite-packagesipykernelkernelbase.py", 
line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "C:Program FilesAnaconda3libsignal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread  File "C:Program   
FilesAnaconda3libasyncioase_events.py", line 409, in run_forever

推荐答案

在尝试了很多快速修复"——卸载和安装 Jupyter 包等之后,唯一的办法就是从头卸载和安装 Anaconda.如果您不害怕从头开始安装所有软件包(在我的情况下没有必要),那么这个解决方案是最好的.

After trying a lot of "quick fixes" - uninstall and install Jupyter packages and etc., the only way was to uninstall and install Anaconda from the beginning. If you are not afraid to install all the packages from scratch (in my case was not necessary) this solution is the best.

这篇关于Anaconda 更新后 Jupyter Notebook 死内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:无法在 Windows 上设置 Anaconda:路径问题 下一篇:VSCode/Virtual Studio Code:无法在 VSCode 终端中加载 C

相关文章

最新文章