我想在jupyter中使用交互式绘图,但是当将后端切换到笔记本时,我得到警告:
警告:无法更改为其他GUI工具包:笔记本。改用qt5。
在Windows 10,Anaconda 1.8.7,jupyter 5.5.0,python 3.6.5和matplotlib 2.2.2上会发生这种情况。
最小的工作示例:
import matplotlib.pyplot as plt
%matplotlib notebook
输出:
Warning: Cannot change to a different GUI toolkit: notebook. Using qt5 instead.
我在这里找到了另一个问题的问题,但找不到任何有此问题的人。
在某些情况下,提到导入ipympl作为解决方案,但是在我看来,这并没有任何改变。
有什么提示吗?
最佳答案
正如ImportanceOfBeingErnest在评论中指出的那样,我的问题与jupyter启动时已经设置的后端有关。但是,如this post中所述,需要在ipython_config.py
中设置后端,而不是在jupyter_notebook_config.py
中设置。
重新启动笔记本服务器后,我可以按照here所述在后端之间进行切换。
关于matplotlib - 无法更改为其他GUI工具箱: notebook - Warning in Jupyter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52703190/