Spyder 5.1.5 运行自定义函数后创建新内核

2022-01-10 00:00:00 python matplotlib spyder anaconda kernel

问题描述

我有这个问题,每次我在 Python 中运行包含函数的脚本时,它都会崩溃并重新启动一个全新的内核.然后 IPython 窗口还会显示 Restarting kernel...

I have this problem where everytime I run a script in Python that contains a function, it just crashes and restarts a completely new kernel. The IPython Window then also shows Restarting kernel...

我已经尝试卸载并重新安装 Anaconda 和 Spyder.我也遵循了这篇文章中提供的步骤:

I already tried to uninstall and re-install Anaconda and Spyder. I also followed the steps provided in this post:

无法更新新的 spyder=5.1.5蟒蛇安装

再次卸载并重新安装后,Spyder (4.2.5) 可以运行一段时间.但是,再次更新 a​​naconda 后(conda update anaconda)会抛出以下错误:

After another uninstall and re-install, Spyder (4.2.5) works for a little while. However, after updating anaconda again (conda update anaconda) it throws the following error:

AttributeError: 'SpyderKernelManager' object has no attribute 'kernel'

如何防止创建新内核并获取输出?

How to prevent the creation of a new kernel and obtain the output?

Github 问题:https://github.com/spyder-ide/spyder/问题/16668


解决方案

可能的解决方案: 问题似乎与最新的 matplotlib 函数(3.4.3)有关,当我再次将 matplotlib 降级到 3.3.4 时,内核问题不再发生.

Possible solution: The problem seems to be with the newest matplotlib function (3.4.3), when I downgraded matplotlib to 3.3.4 again the kernel problem no longer occured.

解决方案: 通过执行 conda install freetype=2.10.4.

Solution: Downgrade freetype from 2.11.0 to 2.10.4 by doing conda install freetype=2.10.4.

相关文章