Turtle
Turtle

Reputation: 31

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'

Upvotes: 1

Views: 810

Answers (2)

Turtle
Turtle

Reputation: 31

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

Upvotes: 1

Ivan Kwong
Ivan Kwong

Reputation: 381

In shell, run:

pip install Pillow

The error means you are missing some modules.

Upvotes: 1

Related Questions