failing import in venv: "from PyQt6.QtSvgWidgets import QSvgWidget" -> "ImportError: DLL load failed while importing QtSvgWidgets: The specified procedure could not be found.
-
Background:
- OS: Windows 7
- Python: 3.8.6
- virtual environment created by "python -m venv venv"
- with this venv active tried to install PyQt6 (6.4.2):
pip install PyQt6 - this works, but running:
from PyQt6.QtSvgWidgets import QSvgWidget
results in the import error / DLL load error above
Tested Solution (failed / not applicable):
According to
https://forum.qt.io/topic/137365/pyqt6-dll-load-failed-while-importing-qtgui-the-specified-procedure-could-not-be-found
I tried the same with PyQt version 6.0.2,
then the import works but later in my program results in another error when importing matplotlib (3.6.3):from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg
AttributeError: type object 'Qt' has no attribute 'KeyboardModifier'Is there any way to solve this? I know that on another PC, where I installed all packages on the global environment, the program somehow works. But there I used to install several PyQt5 versions before and had to copy some files around (unfortunately this was try and error and I did not make notes). I guess this effected the updated PyQt6 there as well.
Best regards,
Juergen -
Qt 6 does not support Windows 7 anymore.
-
Ups, Thank you that explains a lot! I was completely unaware.
Sorry that I did not check that myself.