I am trying to use Qt as matplotlib backend. i have checked it both on kaggle and google colab, but problem is same.
When i write
%matplotlib qt5
i got following error
ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework, as 'headless' is currently running
When i print default backend, its already Qt5Agg
import matplotlib
print(matplotlib.get_backend())
This is happening because Google Colab and Jupyter run on virtual environments which do not support GUI outputs as you cannot open new windows through a browser.
Running it locally on a code editor(Spyder, or even IDLE) ensures that it can open a new window for the GUI to initialize.
For coding the GUI it is best to do it locally on a full-fledged code editor.
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