Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

解决办法

需要安装一个GUI toolkit

pip3 install PyQt5

也有安装tkinter的,没试过

参考

链接1
链接2

发布了95 篇原创文章 · 获赞 30 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/JohnJim0/article/details/105318338