External plotting window freezes with matplotlib plots

Completed

I recently switched to an M3 mac. After installing Pycharm, I'm no longer able to see matplotlib plots in an interactive window. I now have to call plt.show() for the plots to show up, whereas before as soon as the plot was created I would see it without needing to expicitly call plt.show(). This isn't a big deal; the main problem is that the interactive window almost immediately freezes, and I get the spinning wheel of death. 

 

I've included an example script below that reproduce the problem:

 

```

import matplotlib
matplotlib.use("TkAgg") 
import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 4])
plt.title("Venv Plot Test")

```

 

When I run this within Pycharm, the interactive window appears with the plot, and with ~2 seconds I get the spinning wheel. When I run this code in the same virtual environment from the command line, I do not get the same issue. 

 

Here are the details of my Pycharm build:

Build #PC-243.26574.90, built on May 27, 2025

Runtime version: 21.0.6+9-b631.42 aarch64 (JCEF 122.1.9). This is using Python 3.12

 

Thanks in advance for any help!

1
1 comment

Hi Noahfgreenwald , this issue requires thorough investigation, please create an issue on YouTrack (https://youtrack.jetbrains.com/issues/PY) and attach all relevant information (including IDE logs from Help | Collect Logs and Dignostic Data) for quicker resolution.

0

Post is closed for comments.