This is an issue I bugged several people / lists about previously, which has a solution. Thought I'd share it.
I am running the GNU Win32 native build of emacs (ver. 25.3), on Windows 7 (not a cygwin or X11 version). I'm one of those "emacs is an operating system" people, and like running Python shells within emacs. The problem was getting matplotlib figures to work - the figure window would either say "not responding", not render, freeze, or somehow misbehave.
Someone involved in the elpy package (for python on emacs) gave the following solution, which works for me using the TkAgg or Qt5Agg backends: use jupyter console instead of ipython. The whole thing is murky to me, but I thought that nowadays ipython is the Python-specific "piece" / interface to jupyter console. Either way, it seems like jupyter console just gives me ipython, but apparently in a way that the event loop or whatever with figure windows is "happy".
So Add this to your .emacs:
(setq python-shell-interpreter "jupyter"
python-shell-interpreter-args "console --simple-prompt")
(setq python-shell-completion-native-enable nil)
Then M-x run-python, then pylab, then figure(1) etc. and it should work.
Hope this helps more people use emacs as their Windows Python IDE.
-------------- next part --------------
An HTML attachment was scrubbed...