更新到 Spyder 4.1 后出现内核错误

Kernel error after updating to Spyder 4.1

我通过 (conda update spyder) 在 anaconda 中将 spyder 更新为 4.1,但它不起作用,除非我从 anaconda 提示符下打开它,否则它会显示此错误:

启动内核时出错 错误是:

Traceback (most recent call last):

File "C:\Users\anwar\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:\Users\anwar\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:\Users\anwar\Anaconda3\lib\site‑packages\jupyter_client\manager.py", line 211, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)

File "C:\Users\anwar\Anaconda3\lib\site‑packages\jupyter_client\launcher.py", line 135, in launch_kernel
proc = Popen(cmd, **kwargs)

File "C:\Users\anwar\Anaconda3\lib\subprocess.py", line 775, in init restore_signals, start_new_session)

File "C:\Users\anwar\Anaconda3\lib\subprocess.py", line 1178, in _execute_child startupinfo)

FileNotFoundError: [WinError 2] The system cannot find the file specified

在角落里,它仍然显示 spyder 3.7

(这里是 Spyder 维护者) 这个问题是 this issue 的重复问题,它已在我们的 4.1.1 中修复, 2020 年 3 月 19 日发布。

ACK,我也观察到了。

另一个问题:

1) 无法关闭大纲面板。 2)Profiler无法进行profile,例如, 这个程序(带有 i/o 重定向的东西):

def sum_of_harmonic_series(n):
    s = 0
    for k in range(n, 0, -1):
        s += 1 / k
    return s

N = int(input("N: "))  # replace this line with N = 10000 as a workaround  
print('sum = ', sum_of_harmonic_series(N))

在 python 3.7 环境中回滚 Spyder 4.0.1,这应该可以解决问题。