运行程序时报错:Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. 具体如图:
当我们有这个报错时就看不到图像输出,所以我们必须安装GUI后端(也就是图形用户界面),通过这个GUI接口我们可以与设备交互以及可视化绘图。
Python中有很多方式来扩展GUI,最常见的方式是 Tkinter
1、Ubuntu下安装Tkinter来解决该问题:sudo apt-get install python3-tk
2、另一种方法是安装PyQt5
Original: https://www.cnblogs.com/booturbo/p/16585495.html
Author: BooTurbo
Title: 报错 Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. 解决方法
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/685268/
转载文章受原作者版权保护。转载请注明原作者出处!