如何解决如何解决“Jupyter notebook 内核错误”?
我正在尝试在我的机器上运行 jupyter notebook。我完成了安装八度和 scilab 内核的步骤,因为除了 Python 之外我还需要这些。当我尝试创建或打开笔记本时,由于内核错误,我无法执行任何代码。
来自笔记本的错误日志如下:
Traceback (most recent call last):
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\tornado\web.py",line 1704,in _execute
result = await result
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py",line 769,in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\bthlin009\appdata\local\programs\python\python38\lib\site-packages\notebook\services\sessions\handlers.py",line 69,in post
model = yield maybe_future(
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py",line 762,in run
value = future.result()
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py",in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\bthlin009\appdata\local\programs\python\python38\lib\site-packages\notebook\services\sessions\sessionmanager.py",line 88,in create_session
kernel_id = yield self.start_kernel_for_session(session_id,path,name,type,kernel_name)
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py",line 100,in start_kernel_for_session
kernel_id = yield maybe_future(
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py",in run
value = future.result()
File "c:\users\bthlin009\appdata\local\programs\python\python38\lib\site-packages\notebook\services\kernels\kernelmanager.py",line 176,in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self,**kwargs))
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_client\multikernelmanager.py",line 185,in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_client\manager.py",line 309,in start_kernel
kernel_cmd,kw = self.pre_start_kernel(**kw)
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_client\manager.py",line 258,in pre_start_kernel
self.write_connection_file()
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py",line 468,in write_connection_file
self.connection_file,cfg = write_connection_file(self.connection_file,File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py",line 138,in write_connection_file
with secure_write(fname) as f:
File "c:\users\bthlin009\appdata\local\programs\python\python38\lib\contextlib.py",line 113,in __enter__
return next(self.gen)
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py",line 461,in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\bthlin009\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py",line 387,in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: %1 is not a valid Win32 application.
我尝试重新安装内核,并且已将八度音程和 scilab 可执行文件的目录添加到系统变量中。我已经检查了 python 可执行文件的路径是 python38。
我还需要做什么来解决这个问题?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。