There could be a number of reasons for this, but normally it is because you do not have the C
library available for tesseract. Even though pytesseract
is required, it is only half of the solution.
You essentially need to install both the tesseract package for linux, along with the Python binding.
This would essentially be the solution:
! apt install tesseract-ocr
! apt install libtesseract-dev
The above installs the required dependencies for pytesseract
. This is very important, especially the !
without which you cannot install directly to the underlying operating system.
The remainder of the process is relatively simple:
! pip install Pillow
! pip install pytesseract
This installs the Python binding.
The remainder is fairly simple and all you need to do is import
!
import pytesseract
from PIL import ImageEnhance, ImageFilter, Image
Then you can let the magic happen.
Hopefully this helps someone.