If Tesseract isn't in your PATH, tell pytesseract where to find it:
Tesseract OCR is a leading open-source engine for extracting text from images tesseract-ocr download for windows
Click Install and then Finish once the process completes. Configuring Environment Variables (Critical Step) If Tesseract isn't in your PATH, tell pytesseract
You still need to set pytesseract.pytesseract.tesseract_cmd as shown in Method 3, or add Tesseract to your system PATH and restart your IDE. If Tesseract isn't in your PATH