Solve “Failed to init API, possibly an invalid tessdata path” Error

Last modified date

Comment: 1

Possible solution to solve “Failed to init API, possibly an invalid tessdata path” error

 

RuntimeError: Failed to init API, possibly an invalid tessdata path: <PATH>

 

It’s supposed that you already have added the directories where you installed Python and Tesseract-OCR to Path.

 

You don’t have the tessdata folder in the Python path.

For example, if you have Python installed in C:\Programs\Python, you must copy-paste the tessdata folder from Tesseract-OCR to main Python one.

1 Response

  1. Worked like a charm! Had installed from

    conda install -c simonflueckiger/label/tesseract-4.0.0-master tesserocr

    Strangely was not able to find tessdata related to my python files. Had found it in the folder generated from install.packages(‘tesseract’) in my R files! Copy and paste over to the right place resulted in the python module working as expected, with limited testing.

    Thanks again

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment