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.
This happens on Windows 10, Anaconda 1.8.7, jupyter 5.5.0, python 3.6.5 and matplotlib 2.2.2.
Minimal working example:
import matplotlib.pyplot as plt
%matplotlib notebook
Output:
Warning: Cannot change to a different GUI toolkit: notebook. Using qt5 instead.
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.
Any hints?
You must put %matplotlib widget
in the very beginning of the Jupyterlab
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With