[PyQt] chapter6-plugins example does not work

Cody Scott cody at perspexis.com
Thu Oct 12 20:56:06 BST 2017


I was able to build the plugin and run the example, so it was a problem
with my environment.

In order for the path of the plugin to be in the qmldir file I had to add
the Qt/5.9.2/gcc_64/bin directory to my PATH.

I ended up create a Python3.6 environment using miniconda and then building
PyQt5 from source and it worked.

Previously I was using the Python 3.5.2 that came with Ubuntu 16.04

Sorry for bugging you.

On Tue, Oct 10, 2017 at 1:35 PM, Cody Scott <cody at perspexis.com> wrote:

> I just installed Qt 5.9.2 and built PyQt5 using the latest snapshot for
> 5.9.2. This is on Linux Ubuntu 16.04.
>
> $ QML2_IMPORT_PATH=. ~/Qt/5.9.2/gcc_64/bin/qmlscene app.qml
> file:///home/siecje/Downloads/PyQt5_gpl-5.9.1.dev1710071532/
> examples/quick/tutorials/extending/chapter6-plugins/app.qml:42 plugin
> cannot be loaded for module "Charts": Cannot load library
> /home/siecje/Qt/5.9.2/gcc_64/plugins/PyQt5/libpyqt5qmlplugin.so:
> (/home/siecje/Qt/5.9.2/gcc_64/plugins/PyQt5/libpyqt5qmlplugin.so:
> undefined symbol: _Py_NoneStruct)
>
> $ scanelf -l -s _Py_NoneStruct | grep _Py_NoneStruct
> ET_DYN _Py_NoneStruct /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
>
>
>
> On Wed, Sep 6, 2017 at 9:57 AM, Phil Thompson <phil at riverbankcomputing.com
> > wrote:
>
>> On 6 Sep 2017, at 2:52 pm, Cody Scott <cody at perspexis.com> wrote:
>> >
>> > Hey Phil,
>> >
>> > I was wondering if you had a chance to look at this?
>>
>> It's something to do with the Python or the plugin build (works fine on
>> macOS).
>>
>> Phil
>>
>> > On Thu, Aug 17, 2017 at 11:39 AM, Cody Scott <cody at perspexis.com>
>> wrote:
>> > I have built PyQt5 from source using the latest sip and PyQt5 snapshots.
>> >
>> > I'm trying to run examples/quick/tutorials/extending/chapter6-plugins/
>> >
>> > $ QML2_IMPORT_PATH=. LD_LIBRARY_PATH=~/.virtualenvs/pyqt5/lib/python3.5/
>> ~/Qt/5.9.1/gcc_64/bin/qmlscene app.qml
>> >
>> > file:///home/siecje/Downloads/PyQt5_gpl-5.9.1.dev1707250927/
>> examples/quick/tutorials/extending/chapter6-plugins/app.qml:42
>> > plugin cannot be loaded for module "Charts":
>> > Cannot load library /home/siecje/Qt/5.9.1/gcc_64/p
>> lugins/PyQt5/libpyqt5qmlplugin.so:
>> >
>> > (/home/siecje/Qt/5.9.1/gcc_64/plugins/PyQt5/libpyqt5qmlplugin.so:
>> undefined symbol: _Py_NoneStruct)
>> >
>> >
>> > Related email threads
>> >
>> > https://www.riverbankcomputing.com/pipermail/pyqt/2017-
>> February/038794.html
>> > https://www.riverbankcomputing.com/pipermail/pyqt/2017-
>> February/038735.html
>> >
>> >
>> > _______________________________________________
>> > PyQt mailing list    PyQt at riverbankcomputing.com
>> > https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20171012/479bd533/attachment.html>


More information about the PyQt mailing list