在 anaconda 中更新 Spyder 后出现内核错误

Kernel error after updating Spyder in anaconda

我将 Spyder 更新到版本 4.1.0(连同 anaconda 中的所有其他包)。 Spyder 本身工作正常,但内核不工作。我收到以下错误,但不知道如何解决:

An error ocurred while starting the kernel
The error is:

Traceback (most recent call last):
File "C:\Users172010\AppData\Local\Continuum\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1209, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
File "C:\Users172010\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 267, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, env=env, **kw)
File "C:\Users172010\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 211, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users172010\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\launcher.py", line 135, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users172010\AppData\Local\Continuum\anaconda3\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users172010\AppData\Local\Continuum\anaconda3\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

所以,如果我从 anaconda 菜单以图形方式启动 Spyder,它就可以工作(这解决了问题)。

我遇到了同样的问题,我使用 Anaconda Navigator 启动了 Spyder,而不是只调用 Spider(桌面图标)并且它有效。

不知何故,在 Anaconda Navigator 外部调用 Spyder 的逻辑遗漏了一些 Anaconda Navigator 没有遗漏的东西。

在下面的 link 中提到他们正在努力尽快推出 spyder 4.1.1。

同时你有两个选择:

  • 运行 spyder 4.1.0 通过导航器或提示符(如前所述)
  • 在导航器中回滚到 4.0.1

Link: https://github.com/spyder-ide/spyder/issues/11819