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 3.5.2 crashes when launching matplotlib 1.5.1 #7041

Closed
Andrew-S-Rosen opened this issue Sep 5, 2016 · 7 comments
Closed

Python 3.5.2 crashes when launching matplotlib 1.5.1 #7041

Andrew-S-Rosen opened this issue Sep 5, 2016 · 7 comments

Comments

@Andrew-S-Rosen
Copy link

Andrew-S-Rosen commented Sep 5, 2016

I am running Python 3.5.2 via 64-bit Anaconda on Windows 10. All packages have been updated using conda update --all. Anytime I try to make a plot via matplotlib 1.5.1, I get an error identical to the one here that simply says "Python has stopped working" with no other information. I tried uninstalling Anaconda and reinstalling it to no avail. The issue does not occur for .py files without matplotlib. This issue seems to have started today for me.

Running the following replicates the issue:
import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,1,2])

@jenshnielsen
Copy link
Member

I would guess this is most likely related to the GUI framework that matplotlib is using. I would think this is PyQT4 per default on Windows.

What happens if you execute something like

from PyQt4 import QtCore, QtGui

@Andrew-S-Rosen
Copy link
Author

I am able to execute the line you wrote (matplotlib issue still persists). Interestingly, when I try to launch Spyder, that also comes up with the same crash, so clearly something GUI-related is the issue.

@jenshnielsen
Copy link
Member

That line is only the first part of the QT import (on PyQt4) so it's most likely something that happens later

@tacaswell
Copy link
Member

Does this only happen in spyder, the notebook, in an python prompt or in an IPython prompt?

If you do

conda create -n clean_test python=3 matplotlib ipython
activate clean_test
python -c 'import matplotlib.pyplot as plt; plt.plot(range(5))'

does that work?

@Andrew-S-Rosen
Copy link
Author

Andrew-S-Rosen commented Sep 5, 2016

The issue happens everywhere -- command line, Python prompt, and IPython prompt. I can't even load Spyder though.

I created the virtual environment per your instructions and ran it exactly and came to the same issue. I created a virtual environment for Python 2 as well and the issue remains upon generation of a matplotlib figure.

@efiring
Copy link
Member

efiring commented Sep 6, 2016

  1. The issue does not seem to be in any way specific to matplotlib, so I am going to close it.
  2. Given that you can't load Spyder, it sounds like it is probably related to Qt libraries.
  3. Given that you said "it seems to have started today", I suspect that some other software installation or Windows update has created a conflict or left a broken dll. Unfortunately, I don't know how to go about trouble-shooting for that possibility.

@efiring efiring closed this as completed Sep 6, 2016
@efiring
Copy link
Member

efiring commented Sep 6, 2016

You could try posting to the Anaconda support mailing list; someone there might have more ideas.

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

4 participants