Most popular distros do not offer a PySide6 package. If you are a developer that needs Python Qt bindings, and you want to package your application, you can't rely on virtualenvs. You do have some alternatives, but they are not ideal:
python3-pyside2
). There are several issues with this approach:
python3-pyside2
package from its repos.This repo has information on how to package PySide6 alongside your application. It was created to aid in the development of Dangerzone, a multi-platform GUI application that uses Qt. We recommend you take a look at the challenges we encountered while packaging PySide6, in order to understand the design choices in this repo.
[!IMPORTANT] As of 2024-04-15, this repo will no longer build a PySide6 RPM greater than 6.6.3.1. The reason is that PySide6 6.7.0 is now available in Fedora Rawhide, and will soon be available in the rest of the Fedora releases.
UPDATE: On 2024-05-05, an update in Fedora's Python3 package triggered a a segfault in the PySide6 package (see Bugzilla #2279088). Unfortunately, we can't wait for Fedora's PySide6 to reach the stable releases, so we have to package PySide6 6.7.1 ourselves.
You can build source and binary RPM packages with the following commands:
dnf install -y rpm-build python3-devel
./build.sh
You can also find nightly builds in our GitHub actions page.