Search code examples
pythonqtpyqt5qt5

Qt plugin could not load, undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow


I am trying to run a python module that relies on Qt. It gives me this error:

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, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb. 

Digging a bit deeper with QT_DEBUG_PLUGINS enabled, I get this error:

Cannot load library /r1/people/Jonas_P/.conda/envs/playground/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (/r1/people/Jonas_P/.conda/envs/playground/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)
QLibraryPrivate::loadPlugin failed on "/r1/people/Jonas_P/.conda/envs/playground/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" : "Cannot load library /r1/people/Jonas_P/.conda/envs/playground/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so: (/r1/people/Jonas_P/.conda/envs/playground/lib/python3.9/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)"

I have uninstalled any version of pyqt I could find. Reinstalling pyqt with anaconda or pyqt5 with pip did not result in any changes.

Unfortunately, I am on a HPC so I do not have root to install anything outside of my conda env.


Solution

  • I fixed it by downgrading my pyqt5 installation to the latest one that was released when the python module that depends on it (ete3, released Aug 2020) was released.

    For future reference:

    pip install --upgrade pyqt5==5.15.0