Pyside on Boot2Qt in RaspberryPi5
-
Hi,
I'm trying to run a sample app using Boot2Qt image on Raspberry Pi device. The Qt launcher is up in the monitor. Followed the steps in this documentation https://doc.qt.io/qtforpython-6/tutorials/embedded/boot2qt.html.
Getting the following error:
C:\Users\PSI2COB\Documents\NFC>ssh root@172.20.10.2
Last login: Thu Oct 16 09:17:25 2025 from 172.20.10.3
root@b2qt-raspberrypi-armv8:~# ls
Test root
root@b2qt-raspberrypi-armv8:~# cd Test
root@b2qt-raspberrypi-armv8:~/Test# ls
sample_app.py
root@b2qt-raspberrypi-armv8:~/Test# python3 sample_app.py
Traceback (most recent call last):
File "/root/Test/sample_app.py", line 3, in <module>
from PySide6.QtWidgets import QApplication, QLabel
ImportError: libX11.so.6: cannot open shared object file: No such file or directoryHow do I resolve this?
-
Hi,
I'm trying to run a sample app using Boot2Qt image on Raspberry Pi device. The Qt launcher is up in the monitor. Followed the steps in this documentation https://doc.qt.io/qtforpython-6/tutorials/embedded/boot2qt.html.
Getting the following error:
C:\Users\PSI2COB\Documents\NFC>ssh root@172.20.10.2
Last login: Thu Oct 16 09:17:25 2025 from 172.20.10.3
root@b2qt-raspberrypi-armv8:~# ls
Test root
root@b2qt-raspberrypi-armv8:~# cd Test
root@b2qt-raspberrypi-armv8:~/Test# ls
sample_app.py
root@b2qt-raspberrypi-armv8:~/Test# python3 sample_app.py
Traceback (most recent call last):
File "/root/Test/sample_app.py", line 3, in <module>
from PySide6.QtWidgets import QApplication, QLabel
ImportError: libX11.so.6: cannot open shared object file: No such file or directoryHow do I resolve this?
@Pritha-Suresh Since you're accessing the device via ssh you need to forward X11 if you want to run a GUI application this way, see -X ssh parameter,
Also the error you get hints that you did not install X11 on the device.