Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教 #37

Open
jt387 opened this issue Jun 7, 2018 · 1 comment
Open

请教 #37

jt387 opened this issue Jun 7, 2018 · 1 comment

Comments

@jt387
Copy link

jt387 commented Jun 7, 2018

你好, 按照步骤配置好虚拟环境后, 执行如下:
haiyun@dell-Precision-Tower-5810:~$ source ~/deep_ocr_env/bin/activate && cd ~/deep_ocr && ./bin/deep_ocr_reco data/holiday_notification.jpg -v -d
! image to reco: data/holiday_notification.jpg
Traceback (most recent call last):
File "./bin/deep_ocr_reco", line 137, in
show_img(raw, title="raw image")
File "./bin/deep_ocr_reco", line 27, in show_img
plt.gray()
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3932, in gray
set_cmap("gray")
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2372, in set_cmap
im = gci()
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 335, in gci
return gcf()._gci()
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 601, in gcf
return figure()
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 548, in figure
**kwargs)
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 161, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/home/haiyun/deep_ocr_env/lib/python2.7/site-packages/matplotlib/backends/_backend_tk.py", line 1044, in new_figure_manager_given_figure
window = Tk.Tk(className="matplotlib")
File "/home/haiyun/install/python-2.7.11/lib/python2.7/lib-tk/Tkinter.py", line 1814, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":0"
在网上搜索“_tkinter.TclError: couldn't connect to display ":0"” 尝试去解决没有成功, 烦请指点! 多谢!

@nickel823
Copy link

sudo apt-get install python-tk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants