问题描述
AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'. Did you mean: 'FigureCanvasAgg'?
原因分析
matplotlib 的 backend的默认渲染器是agg,agg是一个没有图形显示界面的终端
问题解决
文件 - 设置 - Python Scientific - 取消勾选
或者使用如下三行
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt