[Matplotlib-users] hanging after import of pyplot

Thomas Caswell tcaswell at gmail.com
Fri Jun 19 10:21:20 EDT 2020


If you do

import matplotlib
print(matplotlib.__version__)
print(matplotlib.get_backend())

what do you get?

Are you using IPython or the plain python prompt? Does doing `%matplotlib`
before importing pyplot help?  What OS?  What terminal emulator?  Does
using `matplotlib.use('agg')` (no GUI, but should import) or
`matplotlib.use('tkagg')` before you import pyplot change anything?  Have
you used `pip install --user` or `sudo pip install `?

That this happens across all your environments on the same machine is a bit
confusing as even if it were related to the backend the GUI toolkits should
be sufficiently self-contained to the environment to not affect each other.

Tom

On Fri, Jun 19, 2020 at 9:31 AM Slavin, Jonathan <jslavin at cfa.harvard.edu>
wrote:

> Hi all,
>
> I've had this strange behavior occur, now for the second time, that I'm
> hoping someone can help me diagnose. What happens is that if I import
> pyplot, e.g. like
> import matplotlib.pyplot as plt
> the prompt becomes completely unresponsive. I can't even get out of it by
> ctrl-C or ctrl-Z. I have to actually kill the process. This happens in all
> my environments (which includes python 2.7, 3.6 and 3.7 and anaconda 2 and
> anaconda 3). Last time this happened it resolved itself somehow by itself.
> Because it happens with different versions of python, ipython, and
> matplotlib, I'm thinking that it must have to do with the backend. Any help
> would be appreciated.
>
> Thanks,
> Jon
>
> --
> Jonathan D. Slavin
> Astrophysicist - High Energy Astrophysics Division
> Center for Astrophysics | Harvard & Smithsonian
> Office: (617) 496-7981 | Cell: (781) 363-0035
> 60 Garden Street | MS 83 | Cambridge, MA 02138
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>


-- 
Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20200619/80918640/attachment.html>


More information about the Matplotlib-users mailing list