ipython: python crashes when importing matplotlib in terminal mode on m1 mac
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!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (11 by maintainers)
😄 we’ve got a DTK at conda-forge (which you are welcome to have access to).
You know it’s no good when @isuruf somehow gets in your computer…
Here’s a backtrace,
Checking in to say that the problem is fixed! Again, thanks a million guys. You the best🥇
Not to steal the thunder of fixing this upstream, but we just merged a patch for conda-forge:
https://github.com/conda-forge/ipython-feedstock/pull/129
Builds are up, but might take a bit until they are available on CDN. @erykoff has tested it locally, but if @eugene can check it out and (hopefully) close that would be great.
Thanks all!
❤️💎👐
matplotlib was a red herring. The problem was in ipython, this PR fixes the crash: https://github.com/ipython/ipython/pull/12804
woof, what a brutal thing to do between a developer and their machine.
but for real, posting a link to a gist of all of
conda list --explicit
(or putting it in<details><pre></pre></details>
) is actually what we’d need to do anything more than cosmetic.Unfortunately, we don’t have any resources to do native testing on this platform combination. You might need to get friendly with
strace
(if there is such a thing on osx) to provide more information.In the meanwhile, a full
conda list --explicit
might help point some stuff out.