MarcosRech / python-tesseract

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

Cannot build python tesseract on ubuntu 11.10 #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Building latest python-tesseract

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Ubuntu 11.10 64bit, Tesseract 3.0.1, python-tesseract 6.1

Please provide any additional information below.

I build tesseract-ocr from google (http://code.google.com/p/tesseract-ocr). 
tesseract is working (I followed their installation instruction though from 
http://code.google.com/p/tesseract-ocr/wiki/ReadMe). When I try to build 
python-tesseract:

python setup.py build

I got: 
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions 
build/temp.linux-x86_64-2.7/tesseract_wrap.o 
build/temp.linux-x86_64-2.7/main_dummy.o -ltesseract_api -o 
build/lib.linux-x86_64-2.7/_tesseract.so
/usr/bin/ld: cannot find -ltesseract_api
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

Command "ls -al /usr/lib | greb tesseract_api" though can find it:
lrwxrwxrwx   1 root root           25 2011-09-12 05:47 libtesseract_api.so -> 
libtesseract_api.so.3.0.1

However, command "ldd /usr/lib/libtesseract_api.so" shows
ldd: /usr/lib/libtesseract_api.so: No such file or directory

I also tried to used deb package for 11.04 build I got:
dpkg: dependency problems prevent configuration of python-tesseract:
 python-tesseract depends on leptonica; however:
  Package leptonica is not installed.

Even though I have installed libleptonica (version 1.68-4 - does the lib prefix 
makes a difference?), libleptonica-dev and leptonica-progs

Original issue reported on code.google.com by patryk.z...@gmail.com on 4 Dec 2011 at 2:31

GoogleCodeExporter commented 9 years ago
I am having exactly the same problem . 

Original comment by oaung...@gmail.com on 15 Dec 2011 at 6:51

GoogleCodeExporter commented 9 years ago
Btw if you insatll libleptonica from this repo, it work. :) 

Original comment by oaung...@gmail.com on 15 Dec 2011 at 6:52

GoogleCodeExporter commented 9 years ago
I'm having the same issue. When you say "Btw if you insatll libleptonica from 
this repo, it work" which repo are you referring to? I don't see any 
libleptonica in "http://code.google.com/p/python-tesseract/downloads/list" 
which is the downloads for *this* project. Additionally I don't see any special 
libleptonica in the SVN repo of this project, so I'm at a loss for where you 
found the working install.

Thanks

Original comment by davidpet...@gmail.com on 1 Jan 2012 at 1:39

GoogleCodeExporter commented 9 years ago
when I make python setup.py install I get the following error

swig -python -c++ -I/usr/include/tesseract -I/usr/include 
-I/usr/include/leptonica -o tesseract_wrap.cpp tesseract.i
tesseract.i:11: Error: Unable to find 'publictypes.h'
tesseract.i:12: Error: Unable to find 'thresholder.h'
tesseract.i:13: Error: Unable to find 'baseapi.h'
error: command 'swig' failed with exit status 1

Original comment by lazzarol...@gmail.com on 2 Jan 2012 at 6:50

GoogleCodeExporter commented 9 years ago
You install leptonica from within Ubuntu. Go to terminal and type, "sudo 
apt-get install libleptonica-dev"

Original comment by wykidt...@gmail.com on 3 Feb 2012 at 1:22

GoogleCodeExporter commented 9 years ago
I was able to get this to work today and I made sure to install the following 
dependencies:

sudo apt-get install autoconf automake libtool
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libtiff4-dev
sudo apt-get install zlib1g-dev

After downloading and extracting the tar ball I used the following commands:

./autogen.sh
./configure
make
sudo make install
sudo ldconfig

Make sure to do the first command or make will not work. From there, I 
installed the language data and I am currently using the program. It was a bit 
of work, but worth it IMO.

Original comment by wykidt...@gmail.com on 3 Feb 2012 at 2:08

GoogleCodeExporter commented 9 years ago
Tesseract-ocr is now included in the download list
http://code.google.com/p/python-tesseract/downloads/list

Original comment by FreeT...@gmail.com on 3 Feb 2012 at 4:19