Search code examples
pythonpython-imaging-librarypython-tesseract

Why do I get an error trying to use pytesseract?


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

Im trying that code alone with many other ways to type the pile path as in double '\' etc but I still continue to get the error:

ModuleNotFoundError: No module named 'PIL'


Solution

  • pip install --upgrade --force-reinstall Pillow resolved my issue