Pytesseract is not recognized. I have tried all fixes documented online, including adding Tesseract-OCR to my Path variables, incorporating the pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
command path in my script, uninstalling and reinstalling pytesseract and tesseract.
Asked
Active
Viewed 7,440 times
2

Abagnale
- 67
- 1
- 10
-
Could you show me your code? – jizhihaoSAMA Mar 06 '20 at 08:37
-
after you add Tesseract to your path,you needn't to use ``tesseract_cmd=xxxxxx`` – jizhihaoSAMA Mar 06 '20 at 09:04
-
@jizhihaoSAMA edited to include code – Abagnale Mar 06 '20 at 10:13
1 Answers
0
In the line 23
vpnbookpassword = pytesseract.image_to_string(pwdi)
there you have mentioned pytesseract.image_to_string
but you have imported image_to_string
from pytesseract import image_to_string
and not pytesseract so it could not find pytesseract.
So writing it as vpnbookpassword = image_to_string(pwdi)
would solve the issue

raza sikander
- 143
- 13