Dealing with OCR import

Viewed 382

I am trying to import below commands in jupyter:

from ocr import characters
from ocr.normalization import word_normalization, letter_normalization
# Helpers
from ocr.helpers import implt, resize, img_extend

but receive error :ModuleNotFoundError: No module named 'ocr'. Tried finding reasons but could not find anything as ocr package.What am i missing.

2 Answers

Try pip install ocr or pip3 install ocr in terminal and try to import it again.

Personally, I recommend the using the module Pytesseract instead. It can be installed via pip: pip install pytesseract or pip3 install pytesseract

import pytesseract as ptr
print(ptr.image_to_string("image.jpg"))

You have to install the package via pip. Go to the terminal and type:

pip install ocr

Or:

pip3 install ocr

Or try to find the conda command. Than execute the script

Related