我已经使用jupyter笔记本很长一段时间了,但今天在加载jupyter笔记型电脑时出现了内核错误。我使用的是python 3.9.5,并且我已经有了win32api。
我已尝试安装";pip-install pypiwin32==225〃;
Traceback (most recent call last):
File "C:Userssmutyapulibsite-packagestornadoweb.py", line 1704, in _execute
result = await result
File "C:Userssmutyapulibsite-packagestornadogen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:UserssmutyapuAppDataRoamingPythonPython39site-packagesnotebookservicessessionshandlers.py", line 69, in post
model = yield maybe_future(
File "C:Userssmutyapulibsite-packagestornadogen.py", line 762, in run
value = future.result()
File "C:Userssmutyapulibsite-packagestornadogen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:UserssmutyapuAppDataRoamingPythonPython39site-packagesnotebookservicessessionssessionmanager.py", line 98, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:Userssmutyapulibsite-packagestornadogen.py", line 762, in run
value = future.result()
File "C:Userssmutyapulibsite-packagestornadogen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:UserssmutyapuAppDataRoamingPythonPython39site-packagesnotebookservicessessionssessionmanager.py", line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File "C:Userssmutyapulibsite-packagestornadogen.py", line 762, in run
value = future.result()
File "C:UserssmutyapuAppDataRoamingPythonPython39site-packagesnotebookserviceskernelskernelmanager.py", line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File "C:Userssmutyapulibsite-packagesjupyter_clientmultikernelmanager.py", line 186, in start_kernel
km.start_kernel(**kwargs)
File "C:Userssmutyapulibsite-packagesjupyter_clientmanager.py", line 337, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:Userssmutyapulibsite-packagesjupyter_clientmanager.py", line 286, in pre_start_kernel
self.write_connection_file()
File "C:Userssmutyapulibsite-packagesjupyter_clientconnect.py", line 466, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "C:Userssmutyapulibsite-packagesjupyter_clientconnect.py", line 136, in write_connection_file
with secure_write(fname) as f:
File "C:Userssmutyapulibcontextlib.py", line 117, in __enter__
return next(self.gen)
File "C:Userssmutyapulibsite-packagesjupyter_corepaths.py", line 461, in secure_write
win32_restrict_file_to_user(fname)
File "C:Userssmutyapulibsite-packagesjupyter_corepaths.py", line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: The specified module could not be found.
任何建议或帮助都是值得赞赏的。
只需从C:\Python39\Lib\site packages\pywin32_system32 复制2个文件
对于C:\Windows\System32,它是有效的。
这两个文件是pythoncom38.dll和pywintypes38.dll。
署名:Sujay这是一份参考资料。