freetogo / python-tesseract

Automatically exported from code.google.com/p/python-tesseract
0 stars 0 forks source link

import error on Mac OS X 10.9.5 #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
I expect to see no output when importing the module. Instead, I get:
  File "test.py", line 1, in <module>
    import tesseract
  File "/usr/local/lib/python2.7/site-packages/python_tesseract-0.9-py2.7-macosx-10.9-x86_64.egg/tesseract.py", line 28, in <module>
    _tesseract = swig_import_helper()
  File "/usr/local/lib/python2.7/site-packages/python_tesseract-0.9-py2.7-macosx-10.9-x86_64.egg/tesseract.py", line 24, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: 
dlopen(/usr/local/lib/python2.7/site-packages/python_tesseract-0.9-py2.7-macosx-
10.9-x86_64.egg/_tesseract.so, 2): Symbol not found: 
_TessBaseAPIClearPersistentCache
  Referenced from: /usr/local/lib/python2.7/site-packages/python_tesseract-0.9-py2.7-macosx-10.9-x86_64.egg/_tesseract.so
  Expected in: /usr/local/lib/libtesseract.3.dylib
 in /usr/local/lib/python2.7/site-packages/python_tesseract-0.9-py2.7-macosx-10.9-x86_64.egg/_tesseract.so

What version of the product are you using? On what operating system?
python-tesseract 0.9-0.3 on Mac OS X 10.9.5 "Mavericks" with Python 2.7.8.

plz help me-_-

Original issue reported on code.google.com by ttps920...@gmail.com on 9 Oct 2014 at 5:13

GoogleCodeExporter commented 9 years ago
I have the same error. Did you find a solution?

Original comment by grbtxt...@gmail.com on 7 Jan 2015 at 8:42

GoogleCodeExporter commented 9 years ago
updated. Hope it work

sudo easy_install 
https://python-tesseract.googlecode.com/svn/trunk/src/dist/python_tesseract-0.9-
py2.7-macosx-10.10-x86_64.egg

Original comment by FreeT...@gmail.com on 10 Jan 2015 at 1:38

GoogleCodeExporter commented 9 years ago
I see the same issue using the updated .egg (ran easy_install Jan 11)

OS X 10.10.1
xcode-select version 2339.
Python 2.7.8 (via brew)
opencv 2.4.9 (via brew)
tesseract 3.02.02

thx

Original comment by alan.ber...@gmail.com on 12 Jan 2015 at 6:18

GoogleCodeExporter commented 9 years ago
How about

svn checkout http://python-tesseract.googlecode.com/svn/trunk/src 
python-tesseract
cd python-tesseract
python setup.py clean
python setup.py build
python setup.py install
export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"
python test.py

Original comment by FreeT...@gmail.com on 12 Jan 2015 at 7:42

GoogleCodeExporter commented 9 years ago
I guess you need a clean uninstall of the old version of python tesseract
if you are using homebrew, it should be something like

sudo rm -Rf /usr/local/lib/python2.7/site-packages/*tess* 

Original comment by FreeT...@gmail.com on 12 Jan 2015 at 10:31

GoogleCodeExporter commented 9 years ago
>svn checkout http://python-tesseract.googlecode.com/svn/trunk/src 
python-tesseract
>cd python-tesseract
>python-tesseract $ python setup.py clean

 Your os is:darwin 
 Tesseract version installed is 3.02.02 
 However, the minimal version needed is 3.03
 You may need to build it manually.
....
 Include directory <<tesseract>> was not found
...

So I guess I need to build tesseract from src.  

Original comment by alan.ber...@gmail.com on 12 Jan 2015 at 5:00

GoogleCodeExporter commented 9 years ago
Having the same issue.

OS X 10.10.1, Python 2.7.5, OpenCV 2.4.10, Tesseract 3.02.02

Unable to compile as per SVN instructions ("Unable to find 
'publictypes_mini.h'", which seems to have been deleted recently).

Also unable to run straight from the egg ("Could not find suitable distribution 
for Requirement.parse('python-tesseract==0.9')").

Original comment by robbert....@gmail.com on 13 Jan 2015 at 2:03

GoogleCodeExporter commented 9 years ago
Just upgraded to Tesseract 3.04. Also tried installing an older egg. Issue 
persists:

ImportError: 
dlopen(/Users/robbert/.python-eggs/python-tesseract_0.8-3.0-py2.7_macosx-10.9-in
tel.egg-tmp/_tesseract.so, 2): Symbol not found: 
__ZN9tesseract11TessBaseAPI11ProcessPageEP3PixiPKcS4_iP6STRING
  Referenced from: /Users/robbert/.python-eggs/python-tesseract_0.8-3.0-py2.7_macosx-10.9-intel.egg-tmp/_tesseract.so
  Expected in: /usr/local/lib/libtesseract.3.dylib
 in /Users/robbert/.python-eggs/python-tesseract_0.8-3.0-py2.7_macosx-10.9-intel.egg-tmp/_tesseract.so

Original comment by robbert....@gmail.com on 13 Jan 2015 at 2:57

GoogleCodeExporter commented 9 years ago
Are u using homebrew version?
Also, you need to install tesseract first

https://code.google.com/p/python-tesseract/wiki/HowToCompileForHomebrewMac

Original comment by FreeT...@gmail.com on 13 Jan 2015 at 2:58

GoogleCodeExporter commented 9 years ago
This no longer seems to work. I get a 404 when running it.
sudo easy_install 
https://python-tesseract.googlecode.com/svn/trunk/src/dist/python_tesseract-0.9-
py2.7-macosx-10.10-x86_64.egg

Original comment by r...@canary.is on 4 Feb 2015 at 8:25