【问题标题】:Why am I getting a Kernel error in Spyder?为什么我在 Spyder 中收到内核错误?
【发布时间】:2020-12-28 11:06:05
【问题描述】:

我在 Spyder 中从 Anaconda 运行 Python 3.7,并且从全新安装中收到此错误:

An error ocurred while starting the kernel
The error is:

Traceback (most recent call last):
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1223, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\jupyter_client\manager.py", line 309, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\jupyter_client\manager.py", line 256, in pre_start_kernel
self.write_connection_file()
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\jupyter_client\connect.py", line 474, in write_connection_file
kernel_name=self.kernel_name
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\jupyter_core\paths.py", line 461, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\kaimajerus\AppData\Local\Continuum\anaconda3\envs\dsfs\lib\site‑packages\jupyter_core\paths.py", line 395, in win32_restrict_file_to_user
sd = win32security.GetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION)
pywintypes.error: (50, 'GetFileSecurity', 'The request is not supported.')

【问题讨论】:

标签: python anaconda spyder


【解决方案1】:

如果内核显示一个很长的错误回溯,其中提到了其他包,如 ipython 、 ipykernel 、 jupyter_client 、 traitlets 或 pyzmq ,则问题可能是依赖包的版本过时或不兼容。要解决此问题,请激活环境并更新关键依赖项。

【讨论】:

    猜你喜欢
    • 2021-10-11
    • 2014-04-25
    • 1970-01-01
    • 2016-05-20
    • 2019-10-25
    • 2020-05-03
    • 2018-10-08
    • 2015-04-12
    相关资源
    最近更新 更多