无法更改为其他GUI工具箱

无法更改为其他GUI工具箱

本文介绍了无法更改为其他GUI工具箱:笔记本-Jupyter中的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在jupyter中使用交互式绘图,但是当将后端切换到笔记本时,我得到警告:警告:无法更改为其他GUI工具包:笔记本.改用qt5.

I want to use the interactive plots in jupyter, but when switching the backend to notebook, I get the warning:Warning: Cannot change to a different GUI toolkit: notebook. Using qt5 instead.

这发生在Windows 10,Anaconda 1.8.7,jupyter 5.5.0,python 3.6.5和matplotlib 2.2.2中.

This happens on Windows 10, Anaconda 1.8.7, jupyter 5.5.0, python 3.6.5 and matplotlib 2.2.2.

最小工作示例:

import matplotlib.pyplot as plt
%matplotlib notebook

输出:

Warning: Cannot change to a different GUI toolkit: notebook. Using qt5 instead.

我在这里找到了另一个问题的问题,但还没有人遇到这个问题.在某些情况下,提到导入ipympl作为解决方案,但这对我而言并没有任何改变.

I found some question here where the problem is the other way around, but could not find anyone having this problem yet.In some cases, importing ipympl is mentioned as a solution, but this does not change anything in my case.

有任何提示吗?

推荐答案

正如 ImportanceOfBeingErnest 指出,我的问题与jupyter启动时已经设置的后端有关.但是,如这篇文章中所述,后端需要可以在ipython_config.py中设置,而不是在jupyter_notebook_config.py中设置.

As ImportanceOfBeingErnest pointed out in the comments, my problem was related to the backend already being set when jupyter starts. However, as mentioned in this post, the backend needs to be set in the ipython_config.py, not the jupyter_notebook_config.py.

重启笔记本服务器后,我可以按照.

After restarting the notebook server, I can switch between backends as described here.

这篇关于无法更改为其他GUI工具箱:笔记本-Jupyter中的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-10 22:48