[Qgis-user] 3.16.8+ LTR vs. old 3.16.x for SIP and PyQt5 imports

Jürgen E. Fischer jef at norbit.de
Fri Aug 13 08:12:18 PDT 2021


Hi Ari,

On Thu, 12. Aug 2021 at 17:06:02 -0500, Ari Meyer wrote:
> Thank you, Jurgen -- that trick did the job.  Is this "fix" documented
> anywhere?  Is there any more reliable solution?  I'm concerned that some of
> our devs won't remember to put qgis higher in the imports, and we'll have
> to keep dealing with this.

Hm, apparently running %PYTHONHOME%\python instead of just python in
python-qgis-ltr.bat causes this.  No exactly sure why, but w/o it will just
import Qt.  I guess when run from bin it also finds DLLs there, which it
otherwise doesn't - although bin is in PATH.

> Also, why is it that we only encounter this problem when running from
> outside of QGIS?  When running within QGIS, we don't have any such issues.

QGIS imports qgis (and also uses AddDllDirectory directly)


Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden            https://www.norbit.de
QGIS release manager (PSC)  Germany                 IRC: jef on Libera|OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210813/0a1d2c7b/attachment.sig>


More information about the Qgis-user mailing list