123dipesh / 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 8 years ago

GoogleCodeExporter commented 8 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 8 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 8 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 8 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 8 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 8 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 8 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 8 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 8 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 8 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 8 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

GoogleCodeExporter commented 8 years ago
The same issue with 
OS X 10.10.2, Python 2.7.9, OpenCV 2.4.11(via brew), Tesseract 3.02(via brew)

Already remoted from the egg and run straight from a local egg.

Unable to compile using svn (^Csvn: E200015: Unable to connect to a repository 
at URL 'http://python-tesseract.googlecode.com/svn/trunk/src')

"""
>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10-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.1-py2.7-macosx-10.10-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.1-py2.7-macos
x-10.10-x86_64.egg/_tesseract.so, 2): Symbol not found: 
__ZN9tesseract11TessBaseAPI12GetTextlinesEPP4PixaPPi
  Referenced from: /usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10-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.1-py2.7-macosx-10.10-x86_64.egg/_tesseract.so
"""

Original comment by sLeepo...@gmail.com on 20 Apr 2015 at 5:11

GoogleCodeExporter commented 8 years ago
git clone https://bitbucket.org/3togo/python-tesseract/src
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

#############

It works for me. 

Original comment by sLeepo...@gmail.com on 22 Apr 2015 at 12:33

GoogleCodeExporter commented 8 years ago
OS X 10.10.4, Python 2.7.10, OpenCV 2.4.11(via brew), Tesseract 3.02(via brew)
easy_install 
https://bitbucket.org/3togo/python-tesseract/downloads/python_tesseract-0.9.1-py
2.7-macosx-10.10-x86_64.egg
Downloading 
https://bitbucket.org/3togo/python-tesseract/downloads/python_tesseract-0.9.1-py
2.7-macosx-10.10-x86_64.egg
Processing python_tesseract-0.9.1-py2.7-macosx-10.10-x86_64.egg
creating 
/usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10
-x86_64.egg
Extracting python_tesseract-0.9.1-py2.7-macosx-10.10-x86_64.egg to 
/usr/local/lib/python2.7/site-packages
Adding python-tesseract 0.9.1 to easy-install.pth file

Installed 
/usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10
-x86_64.egg
Processing dependencies for python-tesseract==0.9.1
Finished processing dependencies for python-tesseract==0.9.1
bash-3.2$ python
Python 2.7.10 (default, Jul  9 2015, 13:34:07)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10-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.1-py2.7-macosx-10.10-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.1-py2.7-macos
x-10.10-x86_64.egg/_tesseract.so, 2): Symbol not found: _bbufferBytesToWrite
  Referenced from: /usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10-x86_64.egg/_tesseract.so
  Expected in: /usr/local/lib/liblept.4.dylib
 in /usr/local/lib/python2.7/site-packages/python_tesseract-0.9.1-py2.7-macosx-10.10-x86_64.egg/_tesseract.so
>>>

Original comment by vikarti....@viorsan.com on 14 Jul 2015 at 7:13