【发布时间】:2021-03-12 20:13:14
【问题描述】:
我正在尝试从official website 运行一个基本的matplotlib 示例:
但是,当我运行代码时,我的 Python 解释器会抱怨并输出以下消息:
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
我已经通过pip3 install matplotlib 安装了matplotlib。
我当前的python3 版本是 3.9.1,我的操作系统是 Ubuntu 20.04。
如here 所述,我已经尝试安装 tkinter,但没有成功。 我该怎么办?为什么会这样?
【问题讨论】:
标签: python python-3.x matplotlib tkinter