-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Warning: Cannot change to a different GUI toolkit: notebook. Using qt instead. #11365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you have something set in your matplotlibrc? |
How are you starting the notebook server? |
I don't have a personal matplotlibrc. Is there a system one I should check for?
|
Is there a reason why we can't change backends on the fly? It is super useful at times. |
Matplotlib.use has a force kwarg that allows you to change on the fly. For 3.0.2 this will default to True, allowing switching on the fly Still not sure why this is happening for this user. |
@jklymak Wow thanks for letting me know about that! Pretty awesome! |
#12608 is the PR... |
You can end up with conflicting event loops, changing the backend changes some module level state in |
Hmm interesting. Yeah, even programming is tough. I guess I'm ok with working in a jupyter notebook. then maybe outputting to QT for a bit, closing all my figures, and outputting again to the notebook. |
#12608 should not allow two GUI backends to be used if one of them has already been started. So its not totally "on-the-fly" |
I discourage using the native GUI backends inside of notebooks / jlab. That relies on the fact that your server is running locally so the windows pop-up in the right place. The biggest selling point (for me) of Jupyter is that you can run the kernels somewhere else (which gets you 0 install, access to big compute, and locality with data storage (I am very much wearing my "I work at a user facility" hat)). Better to not get bad habits that won't transfer well..... |
@tacaswell I guess I often crash my browser when viewing and interacting with images. Native backends are often unavoidable :/. 4K screens, large images, are challenging to deal with :/ |
I had this warning come up recently after adding the line |
Is this issue resolved in the new versions ? |
This should be lazier now and there is an open PR (#22005) to make it even lazier. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Bug report
When I try to use the jupyter notebook
%matplotlib notebook
magic command on Linux (as the first command executed in the notebook), I get this warning:Plots then appear a separate qt window, outside the browser. The
%matplotlib inline
command does work.This occurs in freshly-opened jupyter notebooks, with a fresh kernel.
LSST miniconda:
https://github.com/lsst/lsstsw/blob/master/etc/conda3_packages-linux-64.txt
I've since upgraded matplotlib and jupyter to attempt to remedy this, but upgrading didn't change the error.
The text was updated successfully, but these errors were encountered: