anaconda jupyter笔记本内核错误导入错误:导入win32api时dll加载失败:找不到指定的过程

lawou6xi  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(435)

我以前在VisualStudio代码中运行过python 3.8和jupyter笔记本。在我安装了anaconda之后,我不能再运行jupyter笔记本了,并且出现了一个内核错误。

  1. Traceback (most recent call last):
  2. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\web.py", line 1704, in _execute
  3. result = await result
  4. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 769, in run
  5. yielded = self.gen.throw(*exc_info) # type: ignore
  6. File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 69, in post
  7. model = yield maybe_future(
  8. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 762, in run
  9. value = future.result()
  10. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 769, in run
  11. yielded = self.gen.throw(*exc_info) # type: ignore
  12. File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 98, in create_session
  13. kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  14. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 762, in run
  15. value = future.result()
  16. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 769, in run
  17. yielded = self.gen.throw(*exc_info) # type: ignore
  18. File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 110, in start_kernel_for_session
  19. kernel_id = yield maybe_future(
  20. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 762, in run
  21. value = future.result()
  22. File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 176, in start_kernel
  23. kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self,**kwargs))
  24. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_client\multikernelmanager.py", line 186, in start_kernel
  25. km.start_kernel(**kwargs)
  26. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_client\manager.py", line 337, in start_kernel
  27. kernel_cmd, kw = self.pre_start_kernel(**kw)
  28. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_client\manager.py", line 286, in pre_start_kernel
  29. self.write_connection_file()
  30. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py", line 466, in write_connection_file
  31. self.connection_file, cfg = write_connection_file(self.connection_file,
  32. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py", line 136, in write_connection_file
  33. with secure_write(fname) as f:
  34. File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 113, in __enter__
  35. return next(self.gen)
  36. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py", line 461, in secure_write
  37. win32_restrict_file_to_user(fname)
  38. File "C:\Users\*****\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
  39. import win32api
  40. ImportError: DLL load failed while importing win32api: The specified procedure could not be found.

我试过了 conda install ipykernel --update-depsconda install pywin32 但问题依然存在。我怎样才能解决这个问题?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题