I am using a virtual environment with python 3.6 in Ubuntu Server, in a old processor (32 bits Intel).
First, I installed matplotlib with the pip utility.
Then, I installed PyQt5 (5.15.2) from source.
Now, I can run Qt apps written in python normally.
However when I try to do in ipython (for python 3.6):
%matplotlib qt5
I obtain the following error:
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7, PyQt5, PySide >= 1.0.3 or PySide2 is available,
and only one is imported per session.
imports correctly. Please also make sure that PyQt5, ipython, and Matplotlib are all installed in the same virtual environment.
What version of Matplotlib are you installing? About a year (ish?) ago sip changed how it was imported (and could only be imported as a top-level module after pyqt5 has been imported).
It is hard to say much more than that based on the information provided.
Can you do %debug and walk up the call stack to figure out what is failing? Unfortunately the same code that makes it gracefully fail when the qt bindings are not installed also make it difficult to debug when things are installed incorrectly.
Does it work if you do
In[1] %gui qt
? That should trigger IPython Qt import and input hook setup logic without importing Matplotlib.
It might be worth raising an issue with IPython to get more informative error messages as to which sub-modules are missing (and sort out why they want QtSvg)?