問題描述
我有這個問題,每次我在 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將 freetype 從 2.11.0 降級到 2.10.4代碼>.
Solution: Downgrade freetype from 2.11.0 to 2.10.4 by doing conda install freetype=2.10.4
.
這篇關于Spyder 5.1.5 運行自定義函數后創建新內核的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!