Opened 2 years ago

Last modified 20 months ago

#735 new defect

PyQt5 can't find DLL — at Version 4

Reported by: Andreas Müller Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description (last modified by jef)

I'm running qgis-ltr 3.22. When I try to import from PyQt5, I get the error below:

    from PyQt5.QtCore import QSettings
    Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
    ImportError: DLL load failed while importing QtCore: Das angegebene Modul wurde nicht gefunden.

May be I'm missing something, so I can't find QtCore.dll in my install for example.

Change History (4)

comment:1 by jef, 2 years ago

Not reproducable here. The QtCore module file is called QtCore.pyd and the corresponding Qt DLL Qt5Core.dll

Last edited 2 years ago by jef (previous) (diff)

comment:2 by Andreas Müller, 2 years ago

If I use the Python Console inside QGIS, it works, calling python-qgis-ltr.bat on the OSGeo4w-Shell I get the error. PATH and variables all look fine.

comment:3 by jef, 2 years ago

Still can't reproduce. Running python-qgis-ltr.bat from OSGeo4W shell in a fresh install of qgis-ltr:

run o-help for a list of available commands
C:\OSGeo4W>python-qgis-ltr
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtCore import QSettings
>>> quit()

C:\OSGeo4W>type foo.py
from PyQt5.QtCore import QSettings

C:\OSGeo4W>python-qgis-ltr foo.py

C:\OSGeo4W>

comment:4 by jef, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.