'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 1:[1]

In shell, run:

pip install Pillow

The error means you are missing some modules.

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ivan Kwong
Solution 2 Turtle