PyCharm and matplotlib: not responding
Answered
This is a recurring problem that I have had with PyCharm. When trying to display plots with `plt.show()` a black window opens and is not responding. I can only close it. Usually, using `matplotlib.use("qt5agg")` would fix the problem but it seems to no longer be the case. I really don't know what to do.
I run the Professional edition on Ubuntu 20.04, all my python packages are up to date.
Please sign in to leave a comment.
Which PyCharm version are you running? Also, share a quick example if possible. I just tried with the following example on 2024.3.5 with matplotlib 3.10.1
And it worked normally;
I use matplotlib 3.10.0.
I provide you with 2 code examples:
What happens ?
If I uncomment
# use("Qt5Agg")
, I get what I want, second screenshot.I hope it is clearer, let me know if I can provide more information! Thank you for your help.
I was unable to replicate the same behavior on both cases:
Please try the 2025.1 EAP available via the Toolbox App; Make sure to create a brand new project with a new interpreter just in case;
In case it persists, please create a new bug report on YouTrack and make sure to provide the IDE UI logs from Help | Collect Logs and Diagnostic Data