Run PySide6 GUI app on raspberry

Dear Forum.
Im considering to learn PyQT or PySide6 for develop GUI on Raspberry. Searching on google, was not clear for me this points:

  1. if GUI apps, developed for Window (or linux if this could be better for some reason ), can also run for Raspberry PI4 (also with some modify)

2)Could be possible cross compile ; this means, install QT tool (designer or cerator…again i dont know) on window (or linux),and deploy on Raspberry pi4.

3)Possible avoid QML (just for now…I need to learn).

Thanks very much for your support.

Roberto

  1. If you can write os-agnostic python script (no specific windows stuff in python) then you can use exacly the same file on all platform Windows/Linux (RPi4)
  2. There is no need to compile anything you simply create virtual env (both on Windows/Linux) use pip to install PySide6 and all other libraries
  3. You don’t need use any of QML to crate PySide6 GUI app.

If you have further questions let me know!

Thanks Mr Michal for reply.

About question N2:
I read many post on google ,sayng that pip install on rasp dont work. Some post end with the fact that you need Ubuntu on rasp, and not rasbian, …another that you need 64 bit cpu and not 32…
This apart, I can install pyside6 on RPI in some way,on rasbian ?

About question N1:
Let me know if i understood ok. I install Pyside on my PC
window, design some button ,use only python for dothe rest of the job, and, when i go on rasp or linux, i just need to install Pyside and all work ?
Funzion like modify a file, graphic design , will not change
(at the end, i just need file and x-y plot)

Excuse again for insist on same questions
Thanks again
Roberto

Q2
I see: PySide6 is missing in Raspberry Pi OS (32-bit) (based on Debian Bookworm) from 2024-03-15 - Raspberry Pi Forums
Did not know that. I use linux regularly and even got RPi1 or 2, but never use Qt on RPi. But do you have RPi4? it is 64bit CPU.
I’m can find my old RPi and try install PySide6 but right now I’m on vacation and still I can not replicate your scenario.

I can see there is a bit older version avaliable on Raspbian Testing branch acording to this: pyside6 package versions - Repology

But in the end only try can verify it… I can’t not :neutral_face:

Maybe try switch to testing branch on raspbian and give a try.

Q1
Basicly yes, PySide6 code (GUI, widgets etc) alone is 100% OS agnostic, just be sure rest of python code can be run on both OS and you are good to go.

Thanks again for reply

I plan to use the Rasp PI CM4, that have same Processor and Graphic as Rasp PI4 , both 64 bit…

No intrest in develop on old rasb.
So, I will get it and try, and will give you a feedback.

Thanks

2 Likes

Dear Michal
I just want update you about my test on develop app for Raspberry. I create one with PySide6 using IDE PyCharm or VScode.
App was working on Win, Ubuntu and Rasp CM4 (Rasb 64 bit).
On linux i need to install this plugin:

sudo apt install libxcb-cursor0

and all was ok.

Thanks again
Roberto

1 Like

perfect, nice to hear.