can't start hocr-gtk
Bug #596820 reported by
matanya
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hocr (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
after installing hocr 0.10.17 form source I get this traceback:
Traceback (most recent call last):
File "/usr/bin/
from hocr import *
ImportError: No module named hocr
this is on ubuntu 10.4 64 bit.
I expected the program to start but it failed with this traceback.
Changed in hocr (Ubuntu): | |
status: | New → Invalid |
To post a comment you must log in.
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.