hanging after import of pyplot

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

hanging after import of pyplot

Slavin, Jonathan
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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: hanging after import of pyplot

tcaswell
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 <[hidden email]> 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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


--
Thomas Caswell
[hidden email]

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users