Balraj Parmar
Balraj Parmar

Reputation: 13

Installing pytesser on Ubuntu 14.04

I want to use pytesser OCR and I would like to make same changes in the system so that I can import it as a module from anywhere in the system. I tried using advice given on (Installing pytesser) but It's not working for me.

Upvotes: 1

Views: 2977

Answers (1)

Prakash Palnati
Prakash Palnati

Reputation: 3409

you can use

pip install pytesseract

You should use PIL to open an image and feed pytesseract. PIL, is short for Python Image Library. Just a image library.

pytesseract is a wrapper of tesseract.

from PIL import Image
import pytesseract 
im = Image.open('/home/xxxxxxx/Downloads/img.jpg')
text = pytesseract.image_to_string(im)
print (text)

Upvotes: 4

Related Questions