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

Russell Warren russ at perspexis.com
Wed Feb 8 04:59:11 GMT 2017


With a freshly compiled sip and PyQt5 (on Debian) from the nightly
snapshots, I am unable to run the chapter6-plugins example. It fails with:

plugin cannot be loaded for module "Charts": Cannot load library
/home/russ/Qt/5.7/gcc_64/plugins/PyQt5/libpyqt5qmlplugin.so:
(libpython3.5m.so.1.0: cannot open shared object file: No such file or
directory)

This same error happens when attempting with the wheel.

Below is the chain of events (with extra info) to reproduce:

$ cd
~/code/PyQt5_gpl-5.8.dev1702080008/examples/quick/tutorials/extending/chapter6-plugins/
$ python --version
Python 3.5.2 :: Continuum Analytics, Inc.
$ qmake --version
QMake version 3.0
Using Qt version 5.7.1 in /home/russ/Qt/5.7/gcc_64/lib
$ sip -V
4.19.1.dev1702050216
$ python -c "from PyQt5 import QtCore; print(QtCore.PYQT_VERSION_STR)"
5.8.dev1702080008
$ find . -type f
./Charts/piechart.py
./Charts/pieslice.py
./Charts/chartsplugin.py
./Charts/qmldir
./app.qml
$ QML2_IMPORT_PATH=. qmlscene app.qml
file:///home/russ/code/PyQt5_gpl-5.8.dev1702080008/examples/quick/tutorials/extending/chapter6-plugins/app.qml:42
plugin cannot be loaded for module "Charts": Cannot load library
/home/russ/Qt/5.7/gcc_64/plugins/PyQt5/libpyqt5qmlplugin.so:
(libpython3.5m.so.1.0: cannot open shared object file: No such file or
directory)
$ cp /home/russ/miniconda3/envs/qtclient/lib/libpython3.5m.so Charts/
$ ln -s libpython3.5m.so Charts/libpython3.5m.so.1.0
$ ls -l Charts/
total 9944
-rw-r--r-- 1 russ russ     2314 Feb  7 21:30 chartsplugin.py
-rwxr-xr-x 1 russ russ 10165073 Feb  7 23:40 libpython3.5m.so
lrwxrwxrwx 1 russ russ       16 Feb  7 23:41 libpython3.5m.so.1.0 ->
libpython3.5m.so
-rw-r--r-- 1 russ russ     2600 Feb  7 21:30 piechart.py
-rw-r--r-- 1 russ russ     3136 Feb  7 21:30 pieslice.py
-rw-r--r-- 1 russ russ       75 Feb  7 22:55 qmldir
$ QML2_IMPORT_PATH=. qmlscene app.qml
file:///home/russ/code/PyQt5_gpl-5.8.dev1702080008/examples/quick/tutorials/extending/chapter6-plugins/app.qml:42
plugin cannot be loaded for module "Charts": Cannot load library
/home/russ/Qt/5.7/gcc_64/plugins/PyQt5/libpyqt5qmlplugin.so:
(libpython3.5m.so.1.0: cannot open shared object file: No such file or
directory)
$ cat Charts/qmldir
module Charts
plugin pyqt5qmlplugin /home/russ/Qt/5.7/gcc_64/plugins/PyQt5
$ ls /home/russ/Qt/5.7/gcc_64/plugins/PyQt5 -l
total 28
-rwxr-xr-x 1 russ russ 26136 Feb  7 23:26 libpyqt5qmlplugin.so
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170207/78e24ce7/attachment.html>


More information about the PyQt mailing list