Build Qt Quick Python App on RPi 4
-
I developed a Qt Quick app using PySide2, OpenCV and Tensorflow for real-time face recognition, and I would like to deploy it to my Raspberry Pi 4. I followed all the steps for the cross-compilation as in here, I am able to correctly set up my RPi 4 as a device and the related Kit in Qt Creator. Files from my local Ubuntu machine are correctly uploaded to the RPi4 through SFTP. However, I am stuck as to how to proceed in order to build the app for the RPi4. No "Build" options is available from Qt Creator.
Any suggestion on how to proceed?
-
I developed a Qt Quick app using PySide2, OpenCV and Tensorflow for real-time face recognition, and I would like to deploy it to my Raspberry Pi 4. I followed all the steps for the cross-compilation as in here, I am able to correctly set up my RPi 4 as a device and the related Kit in Qt Creator. Files from my local Ubuntu machine are correctly uploaded to the RPi4 through SFTP. However, I am stuck as to how to proceed in order to build the app for the RPi4. No "Build" options is available from Qt Creator.
Any suggestion on how to proceed?
@FS93 said in Build Qt Quick Python App on RPi 4:
No "Build" options is available from Qt Creator
Python is an interpreted language, usually there is nothing to "build". Or do you also have C++ code?
-
Indeed, you are right and I have no C++ code. What I aim to do is to create a self-contained application for my RPi4, that I could run on startup without the hassle of installing all the packages and libraries every time. The main goal is to "build" a sort of embedded device with a screen and a camera that operates stand-alone my Qt and Python (OpenCV and Tensorflow) application.
Is there a way to do it?
-
Indeed, you are right and I have no C++ code. What I aim to do is to create a self-contained application for my RPi4, that I could run on startup without the hassle of installing all the packages and libraries every time. The main goal is to "build" a sort of embedded device with a screen and a camera that operates stand-alone my Qt and Python (OpenCV and Tensorflow) application.
Is there a way to do it?
@FS93 said in Build Qt Quick Python App on RPi 4:
Is there a way to do it?
A container (like Docker) could be a way to do this.
Or simply an archive containing everything (zipped folder). -
@FS93 said in Build Qt Quick Python App on RPi 4:
Is there a way to do it?
A container (like Docker) could be a way to do this.
Or simply an archive containing everything (zipped folder).@jsulm The thing is, I am not able to run my Qt Python script on the RPi 4 as I keep getting errors about missing libraries. Therefore, I wished it would have been possible to create some kind of executable that I could just run on my RPi4, without having to find a solution to that problem.
I tried using "cx_freeze" and I was able to create such a self-contained executable for my app for Windows and for Ubuntu, and the app runs smoothly, but I am not able to do so for the RPi 4 as well. Would using Docker allow me to skip the process of running the failing Python script on my RPi4?
-
Hi,
Which libraries are causing you troubles ?
-
@SGaist said in Build Qt Quick Python App on RPi 4:
Hi,
Which libraries are causing you troubles ?
The main problem is that I cannot properly import some Qt Quick modules when I run my Python script, despite having installed Qt 5.15.2, I keep getting module not found errors on some qml files imports when I try to run my app.
-
There's one thing you have to take into account. Your RPi does not have the same architecture than your desktop computer (might not be true since more high end ARM processors are becoming common in the laptop/desktop world).
If you really want some turnkey solution, you might want to consider using something like Yocto that allows you to build tailor made system for your RPi with everything you need on it.