I have a new macOS laptop with recent Anaconda Python 3.7 installation. I use iTerm2 to open two bash command windows; from the first one I run Python and in the second one I just type "idle" which the Anaconda installation set as a command to start its version of IDLE IDE. Yes, it's for beginners but I just like it.
After a while of running scripts which open plots, the first window where I'm working freezes and I can no longer type. This usually happens after I have plotted something with matplotlib.
The recovery is to close iTerm and Idle and start all over again.
Since this involves some combination of OS and bash and Python I'm not sure where to ask this question, so I thought I would try here first.
Question: Why does launching IDLE from a second terminal window eventually lead to it freezing both? What's a good workaround or fix?
Update: There are warnings in the second iTerm2 window when I start IDLE, this may be the source of the problem:
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
2020-08-03 17:08:26.299 Python[561:6540] CoreText note: Client requested name ".SFNSMono-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-08-03 17:08:26.300 Python[561:6540] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2020-08-03 17:08:26.385 Python[561:6540] CoreText note: Client requested name ".SF NS Mono", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-08-03 17:08:26.411 Python[561:6540] CoreText note: Client requested name ".SFNSMono-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-08-03 17:08:26.411 Python[561:6540] CoreText note: Client requested name ".sf ns mono", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
matplotlib
,numpy
andIDLE
can all cause Python to crash on MacOS (independent of terminal hangs broadly or other issues with MacOS itself). But to answer your original comments...matplotlib
andnumpy
(and even IDLE) having issues on Mac.matplotlib
making calls which "vanilla"numpy
tries using OpenBLAS for. And unfortunately, OpenBLAS doesn't always work correctly, depending on the OS or other factors.