简体   繁体   English

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

[英]Spyder 5.1.5 creates a new kernel after running a custom function

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.我有这个问题,每次我在 Python 中运行包含函数的脚本时,它都会崩溃并重新启动一个全新的内核。 The IPython Window then also shows Restarting kernel...然后 IPython 窗口还显示Restarting kernel...

I already tried to uninstall and re-install Anaconda and Spyder.我已经尝试卸载并重新安装 Anaconda 和 Spyder。 I also followed the steps provided in this post:我还遵循了这篇文章中提供的步骤:

cannot update spyder=5.1.5 on new anaconda install 无法在新的 anaconda 安装中更新 spyder=5.1.5

After another uninstall and re-install, Spyder (4.2.5) works for a little while.再次卸载并重新安装后,Spyder (4.2.5) 工作了一段时间。 However, after updating anaconda again ( conda update anaconda ) it throws the following error:但是,再次更新 a​​naconda ( conda update anaconda ) 后,它会引发以下错误:

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

How to prevent the creation of a new kernel and obtain the output?如何防止创建新内核并获取输出?

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

可能的解决方案:问题似乎出在最新的matplotlib函数 (3.4.3) 上,当我再次将 matplotlib 降级到3.3.4时,内核问题不再出现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM