I could start it in the following q&d way in Lucid Lynx:
after building libhocr-0.10.17 and sudo make install, hocr-gtk is located for me in /usr/local/bin, and hocr.py* lands in
/usr/local/lib/python2.6/site-packages.
I added the following two lines just before line 34 of /usr/local/bin/hocr-gtk
then hocr-gtk runs, but it still has problems. On most of the images I tried to recognize, the gtk gui hangs at the end of phase 3, Font Recogntion. The command line hocr is perfectly able to cope with these images.
What I find strange about my fix is that python does not know about /site-packages. Indeed:
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/usr'
>>>
I would have expected sys.prefix='/usr/local'. I don't know if that hints of a python installation problem, with further consequences on hocr-gtk.
I could start it in the following q&d way in Lucid Lynx:
after building libhocr-0.10.17 and sudo make install, hocr-gtk is located for me in /usr/local/bin, and hocr.py* lands in lib/python2. 6/site- packages. bin/hocr- gtk
/usr/local/
I added the following two lines just before line 34 of /usr/local/
sys.prefix= '/usr/local' append( '/usr/local/ lib/python2. 6/site- packages' )
sys.path.
then hocr-gtk runs, but it still has problems. On most of the images I tried to recognize, the gtk gui hangs at the end of phase 3, Font Recogntion. The command line hocr is perfectly able to cope with these images.
What I find strange about my fix is that python does not know about /site-packages. Indeed:
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/usr'
>>>
I would have expected sys.prefix= '/usr/local' . I don't know if that hints of a python installation problem, with further consequences on hocr-gtk.
Btw an alternative to hocr-gtk is http:// code.google. com/p/qhocr/, though it is based on libhocr-0.10.16.