大佬教程收集整理的这篇文章主要介绍了Matplotlib is currently using agg, which is a non-GUI backend 和 ImportError: No module named 'Tkinter' [closed],大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
跑maskrcnn报错:UserWarning: Matplotlib is currently using agg,which is a non-GUI BACkend,so cAnnot show the figure.
% geT_Backend())
可以在第一部分增加一行代码:@H_313_19@matplotlib.use(‘TkAgg’)
最后显示如下:
import matplotlib
@H_583_18@matplotlib.use(‘TkAgg‘)import matplotlib.pyplot as plt
于是尝试直接安装tkinter,结果没有发现tkinter包
[email protected]:~$ pip3 install tkinter
于是,执行terminal 命令:
[email protected]:~/linuxidc.com$ python3 -m tkinter
[email protected]:~$ sudo apt search python3-tk
[email protected]:~$ sudo apt install python3-tk
在安装完成之后,重新执行程序,然后报出同样的错误,问题仍然存在。
r如果发现有信息说,需要安装tk的开发类库,直接进行安装:
sudo apt install tk-dev (Ubuntu/Debian)
yum install tk-devel (CentOS)
以上是大佬教程为你收集整理的Matplotlib is currently using agg, which is a non-GUI backend 和 ImportError: No module named 'Tkinter' [closed]全部内容,希望文章能够帮你解决Matplotlib is currently using agg, which is a non-GUI backend 和 ImportError: No module named 'Tkinter' [closed]所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。