PyQt6: ImportError: DLL load failed while importing QtGui
phil at riverbankcomputing.com
Fri Apr 15 13:04:36 BST 2022
On 15/04/2022 12:45, Ales Erjavec wrote:
> Since PyQt6 6.3.0 was released, installing PyQt6 with:
> pip install PyQt6==6.2.3
> installs PyQt6==6.2.3 and PyQt6-Qt6==6.3.0
> On Windows this combination raises an:
> ImportError: DLL load failed while importing QtGui: The specified
> procedure could not be found.
> when trying to import QtGui (on linux and macos this combination seems
> to work).
> As I understand PyQt6 should in general work with newer Qt releases.
> Should we always specify PyQt6 and PyQt6-Qt6 versions together to get
> a consistent env?
That would suggest that Qt v6.3.0 is not binary forward compatible with
Qt v6.2 on Windows - which would be a bug. However it could also be a
missing DLL that QtGui v6.3 is dependent on.
In the future I could set the meta-data so that for PyQt ==6.x.y,
PyQt6-Qt6 >=6.x.0, <6.x+1 is required. It shouldn't be necessary but
maybe it's the pragmatic thing to do.
More information about the PyQt