出现了错误:module 'backend_interagg' has no attribute 'FigureCanvas'

在别人的电脑里面可以运行,在我的电脑就不行了,出现了这样的错误(AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'),想知道应该怎么改才合适

img


在import matplotlib.pyplot as plt前面加上import matplotlib 和
matplotlib.use('TkAgg')就好了

AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'
对象没有这个属性
代码没给全,暂无法分析,只知道错误原因