123dipesh / python-tesseract

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

ImportError: /home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/_tesseract.so: undefined symbol: _ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install tesseract-ocr, leptonica-1.69 and python-tesseract from source
2. import tesseract from script
3. Also readText method from simplecv fails with " SimpleCV:2: 'Please install 
the correct OCR library required - http://code.google.com/p/tesseract-ocr/ 
http://code.google.com/p/python-tesseract/' 

What is the expected output? What do you see instead?
script should be able to import tesseract

What version of the product are you using? On what operating system?
Fedora18
tesseract-ocr, leptonica-1.69 and python-tesseract from source

Please provide any additional information below.
--------------------------------------------------------------------------------
------------------
[root@localhost amzn_aiv]# find / -name tesseract.py*
/home/amzn_aiv/python-tesseract/tesseract.pyc
/home/amzn_aiv/python-tesseract/build/lib.linux-x86_64-2.7/tesseract.py
/home/amzn_aiv/python-tesseract/debian/python-tesseract/usr/share/pyshared/tesse
ract.py
/home/amzn_aiv/python-tesseract/tesseract.py
/home/amzn_aiv/python-tesseract/test-slim/dlls/tesseract.py
/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2
.7-linux-x86_64.egg/tesseract.pyc
/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2
.7-linux-x86_64.egg/tesseract.py
===========================================================
[root@localhost amzn_aiv]# export 
PYTHONPATH=/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-te
sseract-py2.7-linux-x86_64.egg/
==========================================================
[root@localhost amzn_aiv]# cat ex.py
import tesseract
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", 
"0123456789abcdefghijklmnopqrstuvwxyz")
api.SetPageSegMode(tesseract.PSM_AUTO)

mImgFile = "eurotext.jpg"
mBuffer=open(mImgFile,"rb").read()
result = tesseract.ProcessPagesBuffer(mBuffer,len(mBuffer),api)
print "result(ProcessPagesBuffer)=",result
=========================================================
[root@localhost amzn_aiv]# python ex.py
Traceback (most recent call last):
  File "ex.py", line 1, in <module>
    import tesseract
  File "/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: 
/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2
.7-linux-x86_64.egg/_tesseract.so: undefined symbol: 
_ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM
====================================================

Installation logs
---------------------------

Install SimpleCV
-----------------
 sudo yum -y install python-ipython opencv-python scipy numpy pygame python-setuptools python-pip
 sudo python-pip install https://github.com/sightmachine/SimpleCV/zipball/develop

Compile leptonica
------------------
wget http://www.leptonica.com/source/leptonica-1.69.tar.gz
tar zxvf leptonica-1.69.tar.gz
cd leptonica-1.69
yum install giflib-devel libtiff-devel zlib-devel libpng-devel 
libjpeg-turbo-devel python-devel -y 
./configure --prefix=/usr
make
sudo make install

Compile Tesseract OCR
----------------------
svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr
./configure --prefix=/usr
make
make install

Compile Python-Tesseract
------------------------
svn checkout http://python-tesseract.googlecode.com/svn/trunk/ python-tesseract
cd python-tesseract
python config.py
python setup.py clean
python setup.py build
python setup.py install --user

Original issue reported on code.google.com by sneha....@gmail.com on 20 Nov 2013 at 8:23

GoogleCodeExporter commented 8 years ago
Have u installed tesseract-langpack-eng?

Original comment by FreeT...@gmail.com on 20 Nov 2013 at 10:05

GoogleCodeExporter commented 8 years ago
I have ..
Downloaded langugage data file (e.g. 'wget
http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz'
Decompress it
and set
export TESSDATA_PREFIX=/home/amzn_aiv/Desktop/tesseract-ocr/

Is this what you mean?

Original comment by sneha....@gmail.com on 20 Nov 2013 at 10:13

GoogleCodeExporter commented 8 years ago
I did
" sudo yum install tesseract-langpack-enm "

I compiled python-tesseract again. But i get the same error.
amzn_aiv@localhost ~]$ sudo yum install tesseract-langpack-enm
[sudo] password for amzn_aiv: 
Loaded plugins: langpacks, presto, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package tesseract-langpack-enm.noarch 0:3.02-6.fc18 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
=============================================================================
 Package                                         Arch                            Version                              Repository                        Size
================================================================================
=============================================================================
Installing:
 tesseract-langpack-enm                          noarch                          3.02-6.fc18                          updates                          509 k

Transaction Summary
================================================================================
=============================================================================
Install  1 Package

Total download size: 509 k
Installed size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
tesseract-langpack-enm-3.02-6.fc18.noarch.rpm                                   
                                                      | 509 kB  00:00:04     
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : tesseract-langpack-enm-3.02-6.fc18.noarch                                                                                                 1/1 
  Verifying  : tesseract-langpack-enm-3.02-6.fc18.noarch                                                                                                 1/1 

Installed:
  tesseract-langpack-enm.noarch 0:3.02-6.fc18                                                                                                                

Complete!
[amzn_aiv@localhost ~]$ 

================================================================================
=======================================
[amzn_aiv@localhost python-tesseract]$ sudo python config.py
[amzn_aiv@localhost python-tesseract]$ sudo python setup.py clean
os=linux
Current Version : tesseract
~~~cv_pc~~~
{'libraries': ['opencv_superres', 'opencv_video', 'opencv_videostab', 
'opencv_ml', 'opencv_contrib', 'opencv_flann', 'opencv_calib3d', 
'opencv_imgproc', 'opencv_core', 'opencv_legacy', 'opencv_stitching', 
'opencv_features2d', 'opencv_ts', 'opencv_objdetect', 'opencv_highgui', 
'opencv_photo'], 'include_dirs': ['/usr/include/opencv']}
['libraries', 'include_dirs']
===========['stdc++', 'tesseract', 'lept', 'opencv_superres', 'opencv_video', 
'opencv_videostab', 'opencv_ml', 'opencv_contrib', 'opencv_flann', 
'opencv_calib3d', 'opencv_imgproc', 'opencv_core', 'opencv_legacy', 
'opencv_stitching', 'opencv_features2d', 'opencv_ts', 'opencv_objdetect', 
'opencv_highgui', 'opencv_photo']===========
['.', '/usr/include/tesseract', '/usr/include/leptonica', 
'/usr/include/opencv2', '/usr/include/opencv']
running clean
================================================================================
=======================================
[amzn_aiv@localhost python-tesseract]$ python setup.py build
os=linux
Current Version : tesseract
~~~cv_pc~~~
{'libraries': ['opencv_superres', 'opencv_video', 'opencv_videostab', 
'opencv_ml', 'opencv_contrib', 'opencv_flann', 'opencv_calib3d', 
'opencv_imgproc', 'opencv_core', 'opencv_legacy', 'opencv_stitching', 
'opencv_features2d', 'opencv_ts', 'opencv_objdetect', 'opencv_highgui', 
'opencv_photo'], 'include_dirs': ['/usr/include/opencv']}
['libraries', 'include_dirs']
===========['stdc++', 'tesseract', 'lept', 'opencv_superres', 'opencv_video', 
'opencv_videostab', 'opencv_ml', 'opencv_contrib', 'opencv_flann', 
'opencv_calib3d', 'opencv_imgproc', 'opencv_core', 'opencv_legacy', 
'opencv_stitching', 'opencv_features2d', 'opencv_ts', 'opencv_objdetect', 
'opencv_highgui', 'opencv_photo']===========
['.', '/usr/include/tesseract', '/usr/include/leptonica', 
'/usr/include/opencv2', '/usr/include/opencv']
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica -o 
tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:78: Warning 462: Unable to set 
dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -I/usr/include/tesseract 
-I/usr/include/leptonica -I/usr/include/opencv2 -I/usr/include/opencv 
-I/usr/include/python2.7 -c tesseract_wrap.cpp -o 
build/temp.linux-x86_64-2.7/tesseract_wrap.o
tesseract_wrap.cpp: In function ‘void SWIG_InitializeModule(void*)’:
tesseract_wrap.cpp:6924:21: warning: statement has no effect [-Wunused-value]
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -I/usr/include/tesseract 
-I/usr/include/leptonica -I/usr/include/opencv2 -I/usr/include/opencv 
-I/usr/include/python2.7 -c main.cpp -o build/temp.linux-x86_64-2.7/main.o
In file included from /usr/include/python2.7/pyconfig.h:6:0,
                 from /usr/include/python2.7/Python.h:8,
                 from config.h:13,
                 from main.cpp:9:
/usr/include/python2.7/pyconfig-64.h:1170:0: warning: "_POSIX_C_SOURCE" 
redefined [enabled by default]
In file included from /usr/include/assert.h:36:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from config.h:8,
                 from main.cpp:9:
/usr/include/features.h:168:0: note: this is the location of the previous 
definition
In file included from /usr/include/python2.7/pyconfig.h:6:0,
                 from /usr/include/python2.7/Python.h:8,
                 from config.h:13,
                 from main.cpp:9:
/usr/include/python2.7/pyconfig-64.h:1192:0: warning: "_XOPEN_SOURCE" redefined 
[enabled by default]
In file included from /usr/include/assert.h:36:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from config.h:8,
                 from main.cpp:9:
/usr/include/features.h:170:0: note: this is the location of the previous 
definition
main.cpp:193:21: warning: ‘iplimage_Type’ defined but not used 
[-Wunused-variable]
main.cpp:200:12: warning: ‘int is_none(PyObject*)’ defined but not used 
[-Wunused-function]
g++ -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/tesseract_wrap.o 
build/temp.linux-x86_64-2.7/main.o -L/usr/lib64 -lstdc++ -ltesseract -llept 
-lopencv_superres -lopencv_video -lopencv_videostab -lopencv_ml 
-lopencv_contrib -lopencv_flann -lopencv_calib3d -lopencv_imgproc -lopencv_core 
-lopencv_legacy -lopencv_stitching -lopencv_features2d -lopencv_ts 
-lopencv_objdetect -lopencv_highgui -lopencv_photo -lpython2.7 -o 
build/lib.linux-x86_64-2.7/_tesseract.so

================================================================================
======================================================================

[amzn_aiv@localhost python-tesseract]$ sudo python setup.py install 
--prefix=/usr
os=linux
Current Version : tesseract
~~~cv_pc~~~
{'libraries': ['opencv_superres', 'opencv_video', 'opencv_videostab', 
'opencv_ml', 'opencv_contrib', 'opencv_flann', 'opencv_calib3d', 
'opencv_imgproc', 'opencv_core', 'opencv_legacy', 'opencv_stitching', 
'opencv_features2d', 'opencv_ts', 'opencv_objdetect', 'opencv_highgui', 
'opencv_photo'], 'include_dirs': ['/usr/include/opencv']}
['libraries', 'include_dirs']
===========['stdc++', 'tesseract', 'lept', 'opencv_superres', 'opencv_video', 
'opencv_videostab', 'opencv_ml', 'opencv_contrib', 'opencv_flann', 
'opencv_calib3d', 'opencv_imgproc', 'opencv_core', 'opencv_legacy', 
'opencv_stitching', 'opencv_features2d', 'opencv_ts', 'opencv_objdetect', 
'opencv_highgui', 'opencv_photo']===========
['.', '/usr/include/tesseract', '/usr/include/leptonica', 
'/usr/include/opencv2', '/usr/include/opencv']
running install
running bdist_egg
running egg_info
writing python_tesseract.egg-info/PKG-INFO
writing top-level names to python_tesseract.egg-info/top_level.txt
writing dependency_links to python_tesseract.egg-info/dependency_links.txt
unrecognized .svn/entries format in 
reading manifest file 'python_tesseract.egg-info/SOURCES.txt'
writing manifest file 'python_tesseract.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_tesseract.so -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/tesseract.py -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/tesseract.py to tesseract.pyc
creating stub loader for _tesseract.so
byte-compiling build/bdist.linux-x86_64/egg/_tesseract.py to _tesseract.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/PKG-INFO -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/SOURCES.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/dependency_links.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/top_level.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
tesseract: module references __file__
creating dist
creating 'dist/python_tesseract-tesseract-py2.7-linux-x86_64.egg' and adding 
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_tesseract-tesseract-py2.7-linux-x86_64.egg
removing 
'/usr/lib64/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_6
4.egg' (and everything under it)
creating 
/usr/lib64/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64
.egg
Extracting python_tesseract-tesseract-py2.7-linux-x86_64.egg to 
/usr/lib64/python2.7/site-packages
python-tesseract tesseract is already the active version in easy-install.pth

Installed 
/usr/lib64/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64
.egg
Processing dependencies for python-tesseract==tesseract
Finished processing dependencies for python-tesseract==tesseract
================================================================================
=========================================
[amzn_aiv@localhost python-tesseract]$ 
[amzn_aiv@localhost python-tesseract]$ cd 
[amzn_aiv@localhost ~]$ python ex.py
Traceback (most recent call last):
  File "ex.py", line 1, in <module>
    import tesseract
  File "/usr/lib64/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: 
/usr/lib64/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64
.egg/_tesseract.so: undefined symbol: 
_ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM

Original comment by sneha....@gmail.com on 20 Nov 2013 at 10:34

GoogleCodeExporter commented 8 years ago
What version of tesseract have u installed?

Original comment by FreeT...@gmail.com on 21 Nov 2013 at 2:50

GoogleCodeExporter commented 8 years ago
Here is the Tesseract version :

tesseract -v
tesseract 3.02.02
 leptonica-1.69
  libgif 4.1.6 : libjpeg 6b : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7

Original comment by sneha....@gmail.com on 21 Nov 2013 at 4:55

GoogleCodeExporter commented 8 years ago
I have python tesseract in ubuntu 12.04 LTS working fine.

I want to move to fedora for hardware issues in ubuntu. Can you please help in 
resolving this issue?

Thanks,
Sneha

Original comment by sneha....@gmail.com on 26 Nov 2013 at 8:44

GoogleCodeExporter commented 8 years ago
https://python-tesseract.googlecode.com/files/python-tesseract_0.8-1.9.fedora19.
x86_64.rpm

Original comment by FreeT...@gmail.com on 28 Nov 2013 at 6:19

GoogleCodeExporter commented 8 years ago
I did a fresh install of Fedora and didn't encounter any errors. Are u using 
the svn version of python-tesseract?

Original comment by FreeT...@gmail.com on 28 Nov 2013 at 6:26

GoogleCodeExporter commented 8 years ago
Yes i Used SVN version of it. I will try with the rpm.

Original comment by sneha....@gmail.com on 28 Nov 2013 at 6:42

GoogleCodeExporter commented 8 years ago
I have updated the wiki page as well:

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

Original comment by FreeT...@gmail.com on 28 Nov 2013 at 6:44

GoogleCodeExporter commented 8 years ago
Hi, 

I am still getting the same issue.

[amzn_aiv@localhost test-slim]$ python test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    import tesseract
  File "/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_64.egg/tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: 
/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2
.7-linux-x86_64.egg/_tesseract.so: undefined symbol: 
_ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM

Is there anything i am missing .. 

Original comment by sneha....@gmail.com on 2 Dec 2013 at 8:09

GoogleCodeExporter commented 8 years ago
rm -Rf 
/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2
.7-linux-x86_64.egg 

Original comment by FreeT...@gmail.com on 2 Dec 2013 at 8:36

GoogleCodeExporter commented 8 years ago
Where should i point PYTHONPATH to?

[amzn_aiv@localhost test-slim]$ rm -rf  
/home/amzn_aiv/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2
.7-linux-x86_64.egg
[amzn_aiv@localhost test-slim]$ python test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    import tesseract
ImportError: No module named tesseract

Original comment by sneha....@gmail.com on 2 Dec 2013 at 9:04

GoogleCodeExporter commented 8 years ago
install rpm 

Original comment by FreeT...@gmail.com on 3 Dec 2013 at 2:39

GoogleCodeExporter commented 8 years ago
http://python-tesseract.googlecode.com/files/python-tesseract_0.8-1.9.fedora19.x
86_64.rpm

Original comment by FreeT...@gmail.com on 3 Dec 2013 at 2:40

GoogleCodeExporter commented 8 years ago
Thank you for your support.

It is not working yet. I installed from rpm.

[amzn_aiv@localhost ~]$ sudo rpm -ihv
python-tesseract_0.8-1.9.fedora19.x86_64.rpm
Preparing...                          #################################
[100%]
Updating / installing...
   1:python-tesseract-tesseract-1     #################################
[100%]

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------

[amzn_aiv@localhost test]$ python test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    import tesseract
  File "/usr/lib64/python2.7/site-packages/tesseract.py", line 26, in
<module>
    _tesseract = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/tesseract.py", line 22, in
swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: /usr/lib64/python2.7/site-packages/_tesseract.so: undefined
symbol: _ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------

[amzn_aiv@localhost test]$ cd
[amzn_aiv@localhost ~]$ python
Python 2.7.3 (default, Aug  9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/tesseract.py", line 26, in
<module>
    _tesseract = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/tesseract.py", line 22, in
swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: /usr/lib64/python2.7/site-packages/_tesseract.so: undefined
symbol: _ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM

Use exit() or Ctrl-D (i.e. EOF) to exit

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------------------------------------

Tested if tesseract is working fine.. It is ..

[amzn_aiv@localhost ~]$ export
TESSDATA_PREFIX=/home/amzn_aiv/Desktop/tesseract-ocr/
[amzn_aiv@localhost ~]$
[amzn_aiv@localhost ~]$ tesseract
/home/amzn_aiv/Downloads/Selected_AIV_Player.png output -l eng
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
[amzn_aiv@localhost ~]$ cat output.txt

ama;On
1 instant vwdeo
i

[amzn_aiv@localhost ~]$

Original comment by sneha....@gmail.com on 3 Dec 2013 at 6:16

GoogleCodeExporter commented 8 years ago
Too bad, my compiled version is for Fedora 19
Can you upgrade yours? 

Original comment by FreeT...@gmail.com on 3 Dec 2013 at 6:21

GoogleCodeExporter commented 8 years ago
Hi .. 

After upgrading to fedora 19, I un-installed and reinstalled rpm, I face the 
same issue..

[amzn_aiv@localhost ~]$ sudo rpm -ihv 
python-tesseract_0.8-1.9.fedora19.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:python-tesseract-tesseract-1     ################################# [100%]
[amzn_aiv@localhost ~]$ 
[amzn_aiv@localhost ~]$ 
[amzn_aiv@localhost ~]$ 
[amzn_aiv@localhost ~]$ python
Python 2.7.5 (default, Nov 12 2013, 16:18:42) 
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: /usr/lib64/python2.7/site-packages/_tesseract.so: undefined 
symbol: _ZN9tesseract11TessBaseAPI14NormalizeTBLOBEP5TBLOBP3ROWbP6DENORM
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> 

Original comment by sneha....@gmail.com on 3 Dec 2013 at 11:34

GoogleCodeExporter commented 8 years ago
yum groupinstall "Development Tools" -y
yum install swig gcc-c++ leptonica rpm-build numpy opencv* -y
yum install python-devel tesseract-devel opencv-devel -y 

Original comment by FreeT...@gmail.com on 3 Dec 2013 at 2:17

GoogleCodeExporter commented 8 years ago
If problems persist, then you might need to compile again

http://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseract4Fedor
a

Original comment by FreeT...@gmail.com on 3 Dec 2013 at 2:18

GoogleCodeExporter commented 8 years ago

Original comment by FreeT...@gmail.com on 9 May 2014 at 7:50