0

The issue is that ocrmypdf pdf not able to find the tesseract-engine path even though I have added in the environment variables. So I need a quick solution is it possible to externally add path to the ocrmypdf.ocr() function in python.

Even imported the every required library but still it's not working Need a quick solution

  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 25 '23 at 21:03

1 Answers1

0

You can define the path in your python script, e.g.:

import pytesseract

# some code to process the image

pytesseract.pytesseract.tesseract_cmd=r'C:\Program Files\Tesseract-OCR\tesseract.exe'

#some other code for ocr

But this should not necessary, if you have in your system environment the pathname, e.g:

C:\Program Files\Tesseract-OCR

and create a variable in your system environmement, too. enter image description here

Hermann12
  • 1,709
  • 2
  • 5
  • 14