UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur
Posted xiexiaokui
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur相关的知识,希望对你有一定的参考价值。
?
>>> plt.show()
__main__:1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
?
原因:
发现发生在 coco.py 文件
?
处理办法:
import matplotlib
>>> matplotlib.get_backend()
‘agg‘
>>> matplotlib.use(‘TkAgg‘)
以上是关于UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur的主要内容,如果未能解决你的问题,请参考以下文章