<div dir="auto"><div>Hi Nyall,<div dir="auto"><br></div><div dir="auto">Thanks for your reply, </div><div dir="auto">I did... And still I get this error. </div><div dir="auto"><br></div><div dir="auto">Kind regards, </div><div dir="auto">Idan </div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 Mar 2019, 00:52 Nyall Dawson, <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 5 Mar 2019 at 00:45, Idan Miara <<a href="mailto:idan@miara.com" target="_blank" rel="noreferrer">idan@miara.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I've used the OSGeo4W setup to install PyQt5 and then ran:<br>
> import PyQt5.QtCore<br>
> from a python shell (OSGeo4W.bat with qt5_env, py3_env inside)<br>
> I'm getting the following error:<br>
><br>
> D:\OSGeo4W64>python<br>
> Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32<br>
> Type "help", "copyright", "credits" or "license" for more information.<br>
> >>> import PyQt5.QtCore<br>
> Traceback (most recent call last):<br>
>   File "<stdin>", line 1, in <module><br>
> SystemError: initialization of QtCore failed without raising an exception<br>
> >>><br>
><br>
> Running the same command in a QGIS python shell works fine (same batch file)<br>
> Please advise.<br>
<br>
You probably need to run:<br>
<br>
py3_env.bat<br>
qt5_env.bat<br>
<br>
first. The osgeo4w command line defaults to python2/Qt4 compatibility<br>
if you don't run those commands.<br>
<br>
Nyall<br>
<br>
<br>
><br>
> Kind regards,<br>
> Idan<br>
><br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div></div></div>