【问题标题】:py:445: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. % get_backend())py:445: UserWarning: Matplotlib 当前正在使用 agg,这是一个非 GUI 后端,因此无法显示该图。 % get_backend())
【发布时间】:2019-08-21 08:16:15
【问题描述】:

我试图在 Github 上运行由 matterport 提供的 Mask-RCNN 存储库。 https://github.com/matterport/Mask_RCNN。当我在 anaconda 中运行演示时,它显示"C:\Anaconda\lib\site-packages\matplotlib\figure.py:445: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. % get_backend()) "。有人遇到过类似的问题吗?

【问题讨论】:

  • 检查代码是否在某个时候有类似“matplotlib.use('Agg')”的内容并删除此行。它在训练期间抑制绘图窗口。

标签: faster-rcnn


【解决方案1】:

如果您尝试在远程服务器上绘图,则可以使用 ssh X11 转发来显示 matplotlib 绘图。

尝试使用这个,

import matplotlib
matplotlib.use('tkagg')

确保你有 XMing 或 XQuartz(如果你在 mac 上),并使用 -Y

$ shh -Y 用户名@servidorIP

【讨论】:

    【解决方案2】:

    在 ~/.config/matplotlib/matplotlibrc 中输入或更改以“backend :”开头的行: 后端:tkagg

    【讨论】:

      猜你喜欢
      • 2020-06-28
      • 2020-01-08
      • 2022-11-10
      • 2019-11-01
      • 2022-12-01
      • 1970-01-01
      • 2019-06-16
      • 2019-07-02
      • 2016-09-18
      相关资源
      最近更新 更多