Issue
I tried to update my code from pyqt5 to pyqt6. I changed nothing else but now I keep getting
ImportError: Failed to import any qt binding
I could not find any question or solution that actually involved pyqt6 so therefore I post this question here. I did a few simple checks. I can import pyqt6 and I can also import matplotlib.pyplot The error seems to originate from:
lib\site-packages\matplotlib\backends\backend_qt5agg.py
It looks a little weird to me to use qt5 here but this is what i found in this tutorial https://www.pythonguis.com/tutorials/pyqt6-plotting-matplotlib/
any ideas, or things that I could check?
Solution
For me the following solved this issue.
After an update of matplotlib I changed the importline saying:
from matplotlib.backends.backend_qt5agg import ...
to
from matplotlib.backends.backend_qtagg import ...
that fixed my error
Answered By - user180146
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.