[python] has no attribute 'TessBaseAPI'

I had an error compiling the code:

import tessercat api = tesseract.TessBaseAPI() 

Error:

AttributeError: the 'module' object does not have the 'TessBaseAPI' attribute

I already installed tesseract via pip . Python version is 2.7 Windows 32bit.

+5
source share
2 answers

I think you are trying to use the python tesseract shell (python-tesseract). Make sure you are using the correct version. You can check this: python-tesseract-0.7.6.win32-py2.7.exe

+1
source

Make sure you do not need to import a subclass, i.e. from tesseract import XYZ

Also - not sure if it was a typo, but your import module is wrong.

0
source

All Articles