此问题已在此处有答案:
Why does tkinter (or turtle) seem to be missing or broken? Shouldn't it be part of the standard library?(3个答案)
"UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure." when plotting figure with pyplot on Pycharm(31个回答)
昨天关门了。
我试着运行一个来自官方网站的基本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。我的操作系统是Ubuntu 20。04.
我已经试过安装tkinter,就像前面描述的here一样,没有成功。我该怎么办?为什么会这样?
1条答案
按热度按时间x8diyxa71#
请尝试这些,如果有适合您的:
1.如果你使用Jupyter Notebook
1.确保你有tkinter,安装tkinter后重新编译python解释器
1.尝试: