4

I have installed pytesseract in Windows 10 system. When I try to run the following line,

pytesser=pytesseract.image_to_string(image)

It throws an error saying,

WindowsError: [Error 5] Access is denied

Even after changing the tesseract_cmd path, it throws the same error.

Looking for the other possible ways to sort this issue.TIA

martineau
  • 119,623
  • 25
  • 170
  • 301

2 Answers2

4

Your code works except the setting of pytesseract.pytesseract.tesseract_cmd. The tesseract_cmd should set to the tesseract executable file installed in your machine. Check if it's pointing to that

See if this helps

Pytesseract Image_to_string returns Windows Error: Access denied error in Python

Akshay Bahadur
  • 497
  • 4
  • 11
0

I also suffering this WinError5 Access denial problem in 2020 even with the tesseract executable path set-up in Windows 10, Python 3.7 and tesseract-ocr-w64-setup-v5.0.0-alpha.20200223.exe from https://github.com/UB-Mannheim/tesseract/wiki in Anaconda.

This solution works for me.

  1. Uninstall tesseract
  2. Run installer as administrator (Right click the installer as select run-as)
raynus
  • 195
  • 2
  • 8