1

Faced problems when using a jupyter notebook and tried to do a simple plot using matplotlib.

Hit many errors, ImportError: Failed to import any qt binding

Also tried installing some libraries in my WSL Ubuntu Linux sudo apt-get install libgl1-mesa-glx But didn't solve the problem: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

After installing other packages I only got from Jupyter a message Kernel is dead.

How to solve issue?

1 Answer 1

5

TL;DR;

sudo apt-get install libxkbcommon-x11-0

More details:

After a lot of googling, what pointed me in the right direction was (this site)[https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found/3] where SGaist's comment of doing

$ export QT_DEBUG_PLUGINS=1
$ jupyter qtconsole

Showed: .../site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)

Which can be installed doing:

sudo apt-get install libxkbcommon-x11-0

And then it all worked....!

Hope this can help someone...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.