-
Notifications
You must be signed in to change notification settings - Fork 754
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
Matplotlib crashing on Mac OS X with solution #36
Comments
...Same here and same Stackoverflow source. I had to insert the following lines:
at the top of the file
to get rid of the crash. |
nice. that works. Suggest a pull request would be a great idea. The specific error this fixed for me was:
|
(redone without whitespace fixups)
For completeness, you can also create this file, to avoid a code change (which may or may not be preferable):
|
Solved, so closing. |
Solution found here: MTG/sms-tools#36
Why is the solution to this to use |
@xserra I don't think this is solved. I'm still running into this issue with conda list matplotlib
# packages in environment at /usr/local/miniconda3/envs/te:
#
# Name Version Build Channel
matplotlib 3.0.2 py36_1001 conda-forge
matplotlib-base 3.0.2 py36hf043ca5_1001 conda-forge Attempting from matplotlib import pyplot as plt
plt.plot(range(10)) throws the following exception python[35172:6260598] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fccc5e0a500'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2f3c9ecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5b481720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2f447275 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff2f36bb40 ___forwarding___ + 1486
4 CoreFoundation 0x00007fff2f36b4e8 _CF_forwarding_prep_0 + 120
5 libtk8.6.dylib 0x0000000121d0b134 TkpInit + 324
6 libtk8.6.dylib 0x0000000121c630ce Initialize + 2622
7 _tkinter.cpython-36m-darwin.so 0x0000000121a8ca46 _tkinter_create + 1174
... If I instead run the following, everything works fine. import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
plt.plot(range(10))
plt.show() |
Running matplot lib on MacOS yielded to a crash on my system in matplotlib. This patch fixes that problem. See here: MTG/sms-tools#36
I read you do not officially support OS X, but since it is mentioned in the Readme, maybe someone finds it useful or I can make a pull request.
OS X is crashing because of matplotlib, which can be avoided by setting the
TkAgg
backend explicitly according to http://stackoverflow.com/a/34109240/965686I do not know if this changes the behaviour of other systems, but I can confirm that it is working on OS X with a Homebrew Python installation.
The text was updated successfully, but these errors were encountered: