[PyQt] chapter6-plugins example does not work with fresh build or wheel

Russell Warren russ at perspexis.com
Wed Feb 8 16:21:10 GMT 2017

Since I suspected the '5.8' in the nightly snapshot, I just rebuilt PyQt5
using the 5.7.1 version.  I also rebuilt sip for good measure.

Same problem: "PyCapsule_Import could not import module "sip"' due to an
undefined symbol (PyExc_RuntimeError)

Imports do work when I run directly.  Not sure what is happening here.

End intent here is to try and use `qmltestrunner` with QObjects regsitered
from PyQt5 using `qmlRegisterType`.  Not sure of any other way to do this
other than through the plugin path (via 'QQmlExtensionPlugin').

Has anyone managed to get PyQt5 qml/qmlscene plugins working? Docs are here:


$ LD_LIBRARY_PATH=$(dirname $(which python))/../lib/:$LD_LIBRARY_PATH
QML2_IMPORT_PATH=. qmlscene app.qml
ImportError: PyCapsule_Import could not import module "sip"
Traceback (most recent call last):
line 41, in <module>
    from PyQt5.QtQml import qmlRegisterType, QQmlExtensionPlugin
undefined symbol: PyExc_RuntimeError
module "Charts" is not installed
$ LD_LIBRARY_PATH=$(dirname $(which python))/../lib/:$LD_LIBRARY_PATH
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sip
>>> from PyQt5.QtQml import qmlRegisterType, QQmlExtensionPlugin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170208/b865aba1/attachment.html>

More information about the PyQt mailing list