I\'m new to Python and matplotlib. A simple script I wrote is crashing and I was able to reproduce the crash with the following code:
import matplotlib.pyplo
You need to set the TkAgg backend explicitly. With the following code, the problem is resolved.
import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
Note that setting the TkAgg backend after importing pyplot does not work either; it crashes too. You need to set it before importing pyplot.