Monday, January 28, 2019

PySide2 on Raspberry Pi 3b+ with Raspbian Buster

PySide2, or Qt for Python, is becoming more usable: since it has landed on PyPi, it is easy to install on almost every PC. Unfortunately, this does not apply to the RaspberryPis. Actually, there are only wheels for 64 bit x86 (and 32bit on Windows), not ARM. And there's a reason for this: the actual Raspbian Stretch has way too old packages for PySide2 to work. To get PySide2 on a RaspberryPi, you'll need Rasbpian Buster, which has not been released (even though there are repositoryes for an upgrade). Then, you can use the packages already compiled for Debian armhf (which are not in the Raspbian repository, at this moment). This is not straightforward, expecially for beginners. So I made an image, ready to be written on a (at least 16GB) microSD card. This image has Raspbian Buster with the main Qt5 and PySide2 modules. I've also switched the desktop environment from LxDE to LxQt.
You can find the image here:
https://www.codice-sorgente.it/raspbian-buster-pyside2-lxqt/#English
In that page you'll find also links to the Debian Qt5 and PySide2 packages for armhf, if you want to install them on another distro. This image works on a RaspberryPi 3B+, because that's the one I have, but should work also at least on version 3 and 2.