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

python complain about "This application failed to start because it could not find or load the Qt platform plugin 'xcb' " after an update of matplotlib #7597

Closed
jdhao opened this issue Dec 9, 2016 · 10 comments

Comments

@jdhao
Copy link

jdhao commented Dec 9, 2016

I am using CentOS 7 and Anaconda 2. Recently, I updated the matplotlib package using conda, if I type
import matplotlib.pyplot as plt, the python interpreter will complain about

This application failed to start because it could not find or load the Qt platform plugin "xcb".
Reinstalling the application may fix this problem

I tried to remove pyqt and then reinstall the package, but that does not help. Finally I have to remove the
entire Anaconda install and reinstall Anaconda.

Is there a better way to solve this problem?

@tacaswell
Copy link
Member

try removing and reinstalling qt as well?

What channels did you install from and what is currently in your enviroment?

This probably should be reported against continuum rather than against mpl.

@jdhao
Copy link
Author

jdhao commented Dec 9, 2016

@tacaswell ,yes, I have tried to remove qt and reinstall it. No effect.
Now I use the matplotlib (version number 1.5.1) bundled with Anaconda, everything is fine.
I think the problem is due to the update of matplotlib.

@dopplershift
Copy link
Contributor

What version of matplotlib was causing the problem?

@jdhao
Copy link
Author

jdhao commented Dec 10, 2016

@dopplershift, currently I am using matplotlib 1.5.1, the newest version available for Anaconda is 1.5.3. So I think it is matplotlib 1.5.3 which is causing the problem.

@tacaswell
Copy link
Member

Closing this as this is not an issue with mpl, but an issue with the packaging by Continuum (which we have no control over).

This is probably a duplicate of ContinuumIO/anaconda-issues#1182 . If not, please raise a new issue on https://github.com/ContinuumIO/anaconda-issues/issues

@jdhao
Copy link
Author

jdhao commented Feb 10, 2017

For anyone who have met the same problem. In my system, the problem is that matplotlib is using the qt dynamic library provided by the system, as indicated by ContinuumIO/anaconda-issues#1249. The solution is to remove the /usr/lib64 (on CentOS system) from the LD_LIBRARY_PATH . Then you should be able to import matplotlib.pyplot as plt without the above error message.

@mimoralea
Copy link

@jdhao thanks for following up. A quick unset LD_LIBRARY_PATH shows that the issue is exactly that. Thank you.

@motikadosh
Copy link

Solved by installing matplotlib from pip instead of conda (In my case both had matplotlib version 2.0.2)

@unicoe
Copy link

unicoe commented Mar 12, 2018

@motikadosh Thank you! your method help me~

@mimoralea
Copy link

mimoralea commented Jun 2, 2018

pip uninstall matplotlib
pip install matplotlib

Does it for me.

russelljjarvis pushed a commit to russelljjarvis/teili that referenced this issue Apr 6, 2022
Somehow the matplot installation is generating an issue with qt. Following matplotlib/matplotlib#7597, I am trying to unset the variable.
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

6 participants