0

I have installed it properly with this tutorial: "https://circuitdigest.com/microcontroller-projects/optical-character-recognition-ocr-using-tesseract-on-raspberry-pi". When I write in the command line tesseract image.png stdout it works. But when running the following script:

 import pytesseract 
 from PIL import Image 

 image=Image.open('image.png')
 text=pytesseract.image_to_string(img, config='') 
 print(text)

It replies:

Error on line 1
ImportError: No module named tesseract
olinox14
  • 6,177
  • 2
  • 22
  • 39

1 Answers1

0

you have to do that: pip install pytesseract, if the problem persists try this (only if you use Windows), add the environmental path var to the Tesseract folder like this 1, you have also to change the var on line 5 img -> image