smallcorgi / Faster-RCNN_TF

Faster-RCNN in Tensorflow
MIT License
2.34k stars 1.12k forks source link

tkinter.TclError #195

Open yang1997yi opened 7 years ago

yang1997yi commented 7 years ago

Detection took 0.639s for 300 object proposals Traceback (most recent call last): File "tools/demo.py", line 136, in demo(sess, net, im_name) File "tools/demo.py", line 73, in demo fig, ax = plt.subplots(figsize=(12, 12)) File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 1202, in subplots fig = figure(fig_kw) File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 535, in figure kwargs) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager return new_figure_manager_given_figure(num, figure) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure window = Tk.Tk() File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1818, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable

what should I do

wingNine commented 6 years ago

are your problem have solved ?

ShiqiLi047 commented 5 years ago

import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np

above this two lines must be in the top codes