Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLVED: "Could not load the Qt platform plugin "xcb" in "" even though it was found" #204

Open
jasper-tms opened this issue Nov 24, 2020 · 2 comments

Comments

@jasper-tms
Copy link
Contributor

I was building a new pymaid virtualenv and ran into a very weird error that I was eventually able to solve. Posting here in case it helps others. I was getting the following error when trying to run import pymaid in an ipython session:

$ ipython
Python 3.7.9 (default, Aug 18 2020, 06:24:24) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import pymaid
In [2]: WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
WARNING: 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.
Aborted (core dumped)
$ 

Interestingly this crash did NOT happen when running in a python session despite happening in ipython sessions. No clue why. Also no clue why I hadn't gotten this error previously, since I've had pymaid virtualenvs before on this computer and been able to import pymaid in ipython just fine. My hunch is that my computer installed some system updates at the same time as I was remaking my virtualenv, and that the emergence of this crash mode was due to some system stuff changing and not actually related to any differences between my new and old virtualenvs, but I can't be sure. Anyway, I solved the problem via sudo apt install libxcb-xinerama0 as suggested here. Other things I had tried: Using pip to uninstall and reinstall maplotlib, pyqt5, or pyqt5-sip did not solve the issue.

I'm on Linux 16.04, and was using pymaid 1.1.2. If anyone has some insight into what this error is about, or if anyone else is able to reproduce the issue and do more tinkering, feel free to share.

@schlegelp
Copy link
Collaborator

Thanks Jasper! Will leave the issue open in case anybody else stumbles over this. Might also add it to the trouble-shooting section of the docs.

@jasper-tms
Copy link
Contributor Author

This problem just popped up for me on another machine, again Ubuntu 16.04, but this time Python 3.6.12 and when trying to import navis instead of import pymaid. sudo apt install libxcb-xinerama0 again solved the problem. So presumably the migration of functions from pymaid to navis means this is now a problem navis users may encounter sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants