If you use PySide6 and have developed against PySide6 version 6.2.x, and you upgrade to 6.3 or later, you may find the following failures.
Module Import Error
ModuleNotFoundError: No module named 'PySide6.QtCore'
The Qt documentation hints at it, so if you performed just a pip install to the new version, then it is likely you’re issue. Instead uninstall and re-install.
In case you are updating your 6.2.x install, make sure the
From: https://www.qt.io/blog/qt-for-python-details-on-the-new-6.3-releasePySide6_Essentials
andPySide6_Addons
wheels are getting installed, otherwise, uninstall and installPySide6
to get the new structure.
So in your virtual environment, or main environment
# ensure all previous installs uninstalled
python3 -m pip uninstall PySide6
python3 -m pip uninstall PySide6-Essentials
python3 -m pip uninstall PySide6-AddOns
# and finally re-install
python3 -m pip install PySide6
Could not load the Qt platform plugin “xcb”
After upgrading PySide6 to 6.5 on a Ubuntu 20.04, attempting to load an application functional with PySide6 6.2.4 you may find it fails on a missing plugin as follows.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, vnc, wayland, minimalegl, vkkhrdisplay, offscreen, wayland-egl, minimal, linuxfb, eglfs.
If you enable debug by adding the environment variable …
QT_DEBUG_PLUGINS=1
… you may see later versions of PySide6 are looking for -cursor xcb library also.
libxcb-cursor.so.0: cannot open shared object file: No such file or directory
This can be installed using apt install as follows
sudo apt install libxcb-cursor0