tesserocr icon indicating copy to clipboard operation
tesserocr copied to clipboard

AttributeError: type object 'tesserocr.OEM' has no attribute 'LSTM_ONLY': linux distro contains old tesseract?

Open dickreuter opened this issue 4 years ago • 3 comments

When running under linux I get AttributeError: type object 'tesserocr.OEM' has no attribute 'LSTM_ONLY'

It works fine when running it under windows. Is this because linux has an older version when pip installing it? Is there a way to get tesseract 4 on Linux with pip install?

dickreuter avatar Jul 07 '21 21:07 dickreuter

pip is used to install python packages only. Tesseract 4 needs to be installed by the standard by Linux distro tool for managing packages or from the source. And tesseract 4 (including the development part) has to be installed before you install tesserocr.

zdenop avatar Sep 15 '21 13:09 zdenop

@zdenop How will tesserocr know where Tesseract is installed? I am working in windows. Is there any way to specify the path of the tesseract executable like there is in pytesseract?

adsk2050 avatar Apr 10 '23 16:04 adsk2050

On windows python (from version 3.9?) requires that used library must be located in package folder e.g. windows tesseroct package must include tesseract library (see https://github.com/simonflueckiger/tesserocr-windows_build/releases)

zdenop avatar Apr 11 '23 13:04 zdenop