Spyder 正在重新启动内核而没有错误消息

Spyder is restarting kernel without error message

正在尝试 运行 在 spyder IDE 版本 5.1.5

中使用此示例脚本
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.gridspec as gridspec

# Fixing random state for reproducibility
np.random.seed(19680801)

dt = 0.01
t = np.arange(0, 10, dt)
nse = np.random.randn(len(t))
r = np.exp(-t / 0.05)

cnse = np.convolve(nse, r) * dt
cnse = cnse[:len(t)]
s = 0.1 * np.sin(2 * np.pi * t) + cnse

fig, (ax0, ax1) = plt.subplots(2, 1)
ax0.plot(t, s)
ax1.psd(s, 512, 1 / dt)

plt.show()

导致

Restarting kernel...

没有任何进一步的错误消息。 Python版本是3.8.12,安装了Anaconda

谢谢 Daniel Althviz 的提示。

这个解决方案解决了问题:

conda install freetype=2.10.4

参考:spyder-ide GitHub issue 16659