Closed GoogleCodeExporter closed 8 years ago
I have added the wiki for Centos
http://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseractForCen
tos
If u find it useful, buy me a coffee pls
Original comment by FreeT...@gmail.com
on 8 Aug 2012 at 8:58
WOW, thanks so much. I will try it out asap and let you know how it went -and
yes, i will buy you a coffee too -.
Original comment by rs.AllW...@gmail.com
on 9 Aug 2012 at 12:43
Hi, Free
I just tried your step by step guide for Centos on my EC2 AMI instance, which
is basically a centos.
I find many points in your guide not accurate and not executable, and well, in
the end, I failed to compile python-tesseract :(
please allow me to make some amendments:
1. use `sudo` before `yum`, `cp` commands
2. for installation of opencv 2.4.2, patch is not working and `sed -i.bak
's|libdir=|libdir=/usr/lib64|g' unix-install/opencv.pc` does not make sense
because there is no such file as "unix-install/opencv.pc"
3. in latest tesseract, ` --with-libdir=lib64` is no longer a valid option for
`configure`
4. for commands like `cp -Rf *opencv* /usr/lib64`, I don't quite understand,
why not `ln -sf`? is that a big deal?
5. most importantly for me, I cannot get python-tesseract to build... It gave
me
main_dummy.cpp:22:21: fatal error: tprintf.h: No such file or directory
I checked my /usr/include/tesseract, there is no such file.
Sorry I am new to all these, and I cannot solve this problem on my own, could
you please help me out of this? and maybe fix the doc as well for others?
Thank you for your great work! Eagerly looking forward to your response.
Original comment by vincent....@gmail.com
on 28 Nov 2012 at 2:35
Fixed
https://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseractForCe
ntos
Original comment by FreeT...@gmail.com
on 10 Dec 2012 at 4:51
Hi,
Did vincent get a fix to the EC2 AMI install ?
I too am following instrucitons and I'm getting the same error when running the
python setup.py
Please help me as I am so close :-)
Error Message:
$ sudo python setup.py build
os=linux
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
aaaaaaaaaaaaaaaaaaaaaaaaaaa
['.', '/usr/local/include/tesseract', '/usr/local/include/leptonica',
'/usr/local/include/opencv2']
running build
running build_py
copying tesseract.py -> build/lib.linux-x86_64-2.6
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/local/include/tesseract -I/usr/local/include/leptonica
-o tesseract_wrap.cpp tesseract.i
/usr/local/include/tesseract/publictypes.h:78: Warning 462: Unable to set
dimensionless array variable
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/local/include/tesseract
-I/usr/local/include/leptonica -I/usr/local/include/opencv2
-I/usr/include/python2.6 -c tesseract_wrap.cpp -o
build/temp.linux-x86_64-2.6/tesseract_wrap.o
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/local/include/tesseract
-I/usr/local/include/leptonica -I/usr/local/include/opencv2
-I/usr/include/python2.6 -c main_dummy.cpp -o
build/temp.linux-x86_64-2.6/main_dummy.o
In file included from /usr/include/python2.6/pyconfig.h:6:0,
from /usr/include/python2.6/Python.h:8,
from config.h:9,
from main_dummy.cpp:9:
/usr/include/python2.6/pyconfig-64.h:1034:0: warning: "_POSIX_C_SOURCE"
redefined [enabled by default]
/usr/include/features.h:162:0: note: this is the location of the previous
definition
/usr/include/python2.6/pyconfig-64.h:1043:0: warning: "_XOPEN_SOURCE" redefined
[enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous
definition
main_dummy.cpp:22:21: fatal error: tprintf.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Original comment by alangunn...@gmail.com
on 25 Jan 2013 at 1:10
Hi,
Solved it after with help of this post:
http://code.google.com/p/python-tesseract/issues/detail?id=20#c14
All i needed to do was
sudo cp ~/tesseract/tesseract-ocr/ccutil/tprintf.h /usr/local/include/tesseract
Original comment by alangunn...@gmail.com
on 25 Jan 2013 at 2:10
Original issue reported on code.google.com by
rs.AllW...@gmail.com
on 7 Aug 2012 at 7:25