“UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.” when plotting figure with pyplot on Pycharm
问题 I am trying to plot a simple graph using pyplot, e.g.: import matplotlib.pyplot as plt plt.plot([1,2,3],[5,7,4]) plt.show() but the figure does not appear and I get the following message: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. I saw in several places that one had to change the configuration of matplotlib using the following: import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt I did this, but then got an