[QGIS-Developer] import PyQt5.QtCore failed (from OSGeo4W python)

Idan Miara idan at miara.com
Mon Mar 4 20:22:18 PST 2019


Hi Nyall,

Thanks for your reply,
I did... And still I get this error.

Kind regards,
Idan


On Tue, 5 Mar 2019, 00:52 Nyall Dawson, <nyall.dawson at gmail.com> wrote:

> On Tue, 5 Mar 2019 at 00:45, Idan Miara <idan at miara.com> wrote:
> >
> > Hi,
> >
> > I've used the OSGeo4W setup to install PyQt5 and then ran:
> > import PyQt5.QtCore
> > from a python shell (OSGeo4W.bat with qt5_env, py3_env inside)
> > I'm getting the following error:
> >
> > D:\OSGeo4W64>python
> > Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64
> bit (AMD64)] on win32
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import PyQt5.QtCore
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> > SystemError: initialization of QtCore failed without raising an exception
> > >>>
> >
> > Running the same command in a QGIS python shell works fine (same batch
> file)
> > Please advise.
>
> You probably need to run:
>
> py3_env.bat
> qt5_env.bat
>
> first. The osgeo4w command line defaults to python2/Qt4 compatibility
> if you don't run those commands.
>
> Nyall
>
>
> >
> > Kind regards,
> > Idan
> >
> > _______________________________________________
> > QGIS-Developer mailing list
> > QGIS-Developer at lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190305/3e2025a3/attachment-0001.html>


More information about the QGIS-Developer mailing list