Hi
You should set up the TESSDATA_PREFIX variable aiming to the folder where
tesseract is being installed.
Check this:
https://github.com/AlejandroFNadal/ia_ds_newspaper_analysis/blob/main/lambda/newspaper-to-img-title/build_tesseract.sh
and this:
https://github.com/AlejandroFNadal/ia_ds_newspaper_analysis/blob/main/lambda/newspaper-to-img-title/Dockerfile

There I have successfully build a docker that runs tesseract

Good luck
Alejandro

El mié, 27 jul 2022 a las 1:11, 'Ajinkya' via tesseract-ocr (<
[email protected]>) escribió:

> Hi All,
> Locally I tried 'brew install tesseract' and it installed 5.2.0.
>
> Following 2 commands installed version 5.1.0
> RUN add-apt-repository ppa:alex-p/tesseract-ocr5
> RUN apt install -y tesseract-ocr
>
> Then I downloaded source code tesseract-5.2.0.tar.gz and followed steps in
> install file:
> RUN apt-get install -y libleptonica-dev
> RUN ./autogen.sh &&\
> ./configure  &&\
> make &&\
> make install
>
> This installs 5.2.0 but gives error:
>
>  pytesseract.pytesseract.TesseractError: (1, 'Error opening data file
> /usr/local/share/tessdata/eng.traineddata Please make sure the
> TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
> Failed loading language \'eng\' Tesseract couldn\'t load any languages!
> Could not initialize tesseract.')
> Any help would be really appreciated.
> Thanks
>
>
>
> ------------------------------
> This communication is intended only for the recipient to whom it is
> addressed.  It may contain information that is privileged and
> confidential.  Nothing contained in this email constitutes tax, legal,
> insurance or investment advice, nor does it constitute a solicitation or an
> offer to buy or sell any security or other financial instrument.  If you
> are not the intended recipient of this message, any use, dissemination,
> distribution, or copying of this communication is strictly prohibited.  If
> you have received this communication in error, please immediately notify
> the sender and permanently delete all copies that you may have.
>
> --
> You received this message because you are subscribed to the Google Groups
> "tesseract-ocr" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tesseract-ocr/c51d5356-8fc6-4075-901d-703885f13c41n%40googlegroups.com
> <https://groups.google.com/d/msgid/tesseract-ocr/c51d5356-8fc6-4075-901d-703885f13c41n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/CAB1b1biiX-8VoQOMsSPy%3DLr8DzDrMw%2BDp-6fQk-tuC0fbK%2BEyg%40mail.gmail.com.

Reply via email to