0

So i wanted to use tesseract and i installed both pytesseract and tesseract ocr and created the path. So why is it when i try to use tesseract i get an error message which says :

1, 'Error opening data file C:\\Program Files (x86)\\Tesseract-OCR\tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'eng\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')

and here is my code :

import pytesseract
from PIL import Image

img = Image.open('maaan.jpg')
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe'
print( pytesseract.image_to_string(img,lang='eng'))

by the way im using windows 10

please help me :(

IvanS95
  • 5,364
  • 4
  • 24
  • 62
Nisox
  • 1
  • 1
  • 7

0 Answers0