gpt4 book ai didi

python - Jupyter 笔记本内核错误 - FileNotFoundError : [WinError 2]

转载 作者:行者123 更新时间:2023-12-04 16:29:56 26 4
gpt4 key购买 nike

我最近在 Anaconda 上的一些库中遇到了一些问题,所以我重新安装了 Anaconda,当我再次启动它时,Jupityr Notebook 内核错误发现了这段文字:

Traceback (most recent call last):
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\web.py", line 1543, in _execute
result = yield result
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Steven\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 73, in post
type=mtype))
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Steven\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Steven\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\Steven\Anaconda3\lib\site-packages\tornado\gen.py", line 315, in wrapper
yielded = next(result)
File "C:\Users\Steven\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\Steven\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\Steven\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 259, in start_kernel
**kw)
File "C:\Users\Steven\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\Steven\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\Steven\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\Steven\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

当我启动并打开文件时出现此错误。它拒绝运行代码,只是坐在那里有点死。内核错误出现在几乎所有使用 Jupyter notebook 打开的文件中。

最佳答案

下面的解决方案对我有用。您可以在虚拟环境中的命令提示符下或在 Anaconda 提示符下运行此代码。

python -m ipykernel install --user

详细解释和说明看 here.

关于python - Jupyter 笔记本内核错误 - FileNotFoundError : [WinError 2],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51204683/

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