py:445: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. % get_backend())

…衆ロ難τιáo~ 提交于 2019-12-07 21:59:33

问题


I was trying to run the Mask-RCNN repository provided by the matterport in Github. https://github.com/matterport/Mask_RCNN. when I run the demo in the anaconda, it showed "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()) ". Is there someone came cross the similar problem?


回答1:


If you are trying to plot on a remote server, ssh X11 forwarding can then be used to display matplotlib plots.

Try to use this,

import matplotlib
matplotlib.use('tkagg')

Make sure you have XMing or XQuartz (if you're on mac), and use -Y

$ shh -Y username@servidorIP



来源:https://stackoverflow.com/questions/55433523/py445-userwarning-matplotlib-is-currently-using-agg-which-is-a-non-gui-backe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!