How do I deploy a Python PyQt5 Application to an embedded Linux?
Asked Answered
X

2

6

I've written a Python3 application which uses PyQt5 for the GUI, it runs fine on every desktop system. Now I would like to run this on an embedded linux (specifically: Yocto BSP) which is delivered by the hardware manufacturer. Since there's no PyQt5 but a qt5 and python3 package running on the BSP, I would like to (somehow) make a standalone executable of the application. Plus I'm not experienced with writing bitbake recipes and creating a custom BSP and have not found any existing PyQt5 recipes.

What I've tried so far (and did not succeed):

  • Make a standalone executable with nuitka, cx-freeze, pyinstaller (compiled on a similiar arm platform)
  • Use pyqtdeploy to convert python into c++ source code, then compile it by using the supplied build-environment. I did a static compile of the pyqt5 and sip packages and everything compiles just fine, but make reports undefined references (linker errors) which I cannot resolve (as I'm not very familiar with c++).

Now what's the best approach to let a python/pyqt5 application run on an embedded linux system with very limited packages?

Xanthein answered 2/9, 2015 at 20:41 Comment(2)
Unfortunately not the answer you'd like... Personally, I'd look into adding PyQt5 to my own layer. (And later on submitting it to a suitable open layer). There's a python-pyqt recipe in meta-oe that //might// be of some help; though there are differences between Qt4 and Qt5 in OpenEmbedded / Yocto.Urticaceous
For the newcomers, since Release branch Thud of the Yocto Project, you will find what you need under the name: python3-pyqt5.Twandatwang
C
0

You can see the link python-pyqt5

Cosignatory answered 26/10, 2017 at 9:25 Comment(1)
Fixed link github.com/meta-qt5/meta-qt5/tree/master/recipes-python/pyqt5Electrocorticogram
C
0

First you should get the meta of qt5: https://github.com/meta-qt5/meta-qt5 Then modify the local.con and you-image.bb to make the qt5 can be compiled into the image.

Conchology answered 2/8, 2021 at 1:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.