[python]has no attribute 'TessBaseAPI'

2019-05-02 05:50发布

I got an error when I compiled code blow:

import tessercat
api = tesseract.TessBaseAPI()

The error is:

AttributeError:'module' object has no attribute 'TessBaseAPI'

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

2条回答
狗以群分
2楼-- · 2019-05-02 06:39

Make sure that you don't need to import a sublcass ie from tesseract import XYZ

Also - not sure if this was a typo but your import module is misspelled.

查看更多
不美不萌又怎样
3楼-- · 2019-05-02 06:51

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

查看更多
登录 后发表回答