imagetotext Set the path to the Tesseract executable if it's not in your PATH environment variable pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' Open the image file convert text to image .