【问题标题】:Spyder is restarting kernel without error messageSpyder 正在重新启动内核而没有错误消息
【发布时间】:2022-01-07 00:20:53
【问题描述】:

尝试在 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。

【问题讨论】:

标签: python spyder


【解决方案1】:

感谢Daniel Althviz 的提示。

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

conda install freetype=2.10.4

参考:spyder-ide GitHub issue 16659

【讨论】:

    猜你喜欢
    • 2022-01-10
    • 2018-04-26
    • 2021-03-30
    • 1970-01-01
    • 2019-12-16
    • 2020-01-31
    • 2021-02-02
    相关资源
    最近更新 更多