I am building an application that embeds a matplotlib figure into the GUI. The problem is that my app is crashing as soon as I add anything from matplotlib into my code (ex
If you don't want to edit the code, you can use set the following environment variable that matplotlib is reading:
matplotlib
MPLBACKEND=TkAgg
This way, no matter when you import pyplot, it'll work
pyplot