[osgeo4w-dev] [osgeo4w] #735: PyQt5 can't find DLL

OSGeo4W trac_osgeo4w at osgeo.org
Wed Sep 21 03:08:32 PDT 2022


#735: PyQt5 can't find DLL
---------------------------+----------------------------
Reporter:  Andreas Müller  |       Owner:  osgeo4w-dev@…
    Type:  defect          |      Status:  new
Priority:  major           |   Component:  Package
 Version:                  |  Resolution:
Keywords:                  |
---------------------------+----------------------------
Comment (by Andreas Müller):

 I found this in https://bugs.python.org/issue43173:

 In 3.8+, the search path for the dependent DLLs of a normally imported
 extension module includes the following directories:

     * the loaded extension module's directory
     * the application directory (e.g. that of python.exe)
     * the user DLL search directories that get added by
       SetDllDirectory() and AddDllDirectory(), such as with
       os.add_dll_directory()
     * %SystemRoot%\System32

 So the windows %PATH% has no longer an effect on finding DLL's. In case of
 using an external IDE which runs apps\Python39\python.exe you'll have to
 find a way to preload a python statement/script. For PyScripter I use the
 python_init.py with this statement `import qgis.sys` which seems to do the
 trick. However, not elegant.
-- 
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/735#comment:9>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the osgeo4w-dev mailing list