无法更改为不同的 GUI 工具包:notebook - Jupyter 中的警告
Cannot change to a different GUI toolkit: notebook - Warning in Jupyter
我想在 jupyter 中使用交互式绘图,但是当将后端切换到 notebook 时,我收到警告:
警告:无法更改为不同的 GUI 工具包:notebook。改为使用 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 pointed out in the comments, my problem was related to the backend already being set when jupyter starts. However, as mentioned in ,后端需要设置在ipython_config.py
,而不是jupyter_notebook_config.py
。
重启笔记本服务器后,我可以按照描述在后端之间切换。
你必须把%matplotlib widget
放在Jupyterlab的最开头
我想在 jupyter 中使用交互式绘图,但是当将后端切换到 notebook 时,我收到警告: 警告:无法更改为不同的 GUI 工具包:notebook。改为使用 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 pointed out in the comments, my problem was related to the backend already being set when jupyter starts. However, as mentioned in ipython_config.py
,而不是jupyter_notebook_config.py
。
重启笔记本服务器后,我可以按照描述在后端之间切换
你必须把%matplotlib widget
放在Jupyterlab的最开头