Pyside6 on Rocky Linux 9.6 is missing xcb plugin

On Rocky Linux 9.6 I disabled Wayland by editing /etc/gdm/custom.conf.

I then instyalled PySide6 into a venv but when I try to use it I get this error:

qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/mnt/home/frank_rocky/Documents/dev/virtual_envs/cut_detector_ui/lib64/python3.11/site-packages/cv2/qt/plugins” 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-brcm, wayland-egl, wayland, xcb.

Based on info on the web I successively tried:

dnf install epel-release

dnf install mesa-libGLU.x86_64

dnf install mesa-libGL-devel


dnf install     libfontconfig1-dev     libfreetype-dev     libgtk-3-dev     libx11-dev     libx11-xcb-dev     libxcb-cursor-dev     libxcb-glx0-dev     libxcb-icccm4-dev     libxcb-image0-dev     libxcb-keysyms1-dev     libxcb-randr0-dev     libxcb-render-util0-dev     libxcb-shape0-dev     libxcb-shm0-dev     libxcb-sync-dev     libxcb-util-dev     libxcb-xfixes0-dev     libxcb-xkb-dev     libxcb1-dev     libxext-dev     libxfixes-dev     libxi-dev     libxkbcommon-dev     libxkbcommon-x11-dev     libxrender-dev

dnf install xcb-cursor*

dnf install xcb-util-*

But nothing worked.

Can somebody help please?

Cheers,

frank

Hi frueter,

do you have QT6 installed on system ?

I usually do “dnf install qt6-qtwebengine” and rest of QT6 platform gets pulled in to system.

1 Like

OMG, I feel stupid now. That did the trick of course.
I realise now why I thought this was already installed:
With PySide2 (which I had to stick to for the longest time) I could use dnf to install which pulled QT as well.
With PySide6 I had to use pip and my muscle memory made my brain go “all done” and never look back.

Thanks!! I was too far down the rabbit hole to realise.

Frank

1 Like

No problems. Glad you fixed it.

1 Like