question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python crashes when importing matplotlib in terminal mode on m1 mac

See original GitHub issue

Hello community,

I am experiencing the following crash when trying to plot from the command line on my M1 mac:

(base) ➜  ~ ipython
Python 3.9.1 | packaged by conda-forge | (default, Jan 26 2021, 01:30:54) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import matplotlib

In [2]: matplotlib.get_backend()
Out[2]: 'MacOSX'

In [3]: [1]    2797 bus error  ipython

Even more weird, if I try to set any value of c.InteractiveShellApp.matplotlib in the ipython_config.py, the crash occurs instantly (that is, when ipython starts). In “vanilla” python REPL, everything works as expected.

My ipython (7.20.0) and matplotlib (3.3.4) are installed through conda and this is otherwise a “fresh” install.

Any help is appreciated!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
isurufcommented, Feb 2, 2021

😄 we’ve got a DTK at conda-forge (which you are welcome to have access to).

2reactions
bollwyvlcommented, Feb 2, 2021

You know it’s no good when @isuruf somehow gets in your computer…

Read more comments on GitHub >

github_iconTop Results From Across the Web

matplotlib crashes in plt.show() on macOS with TkAgg backend
When I run the script in a debug mode with stopping point in "plt.show()" - and no crashing and scripts ends without showing...
Read more >
M1 native Python is crashing. | Apple Developer Forums
I'd been successfully running M1 native Python code on a MacBook Pro ... %%time import tensorflow.compat.v2 as tf import tensorflow_datasets as tfds.
Read more >
Backends — Matplotlib 3.6.2 documentation
Some people use Matplotlib interactively from the Python shell and have plotting windows pop up when they type commands. Some people run Jupyter...
Read more >
Install Python with NumPy SciPy Matplotlib on macOS Big Sur ...
How to install Python with NumPy, SciPy, Matplotlib on macOS Big Sur Apple Silicon M1.The procedure presented in the video should work on ......
Read more >
Installing TensorFlow 2.4 and JupyterLab on Mac with M1 ...
But every time I run this import, the Kernel crashes. So it might be that TensorFlow did in fact not install correctly. Using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found