ModuleNotFoundError: No module named ‘PIL’

When running a python application, I got the error message ModuleNotFoundError: No module named ‘PIL’

(venv) boby@sok-01:~/work/powder (master)$ python main.py 
Traceback (most recent call last):
  File "main.py", line 6, in 
    from extras import *
  File "/home/boby/work/powder/extras.py", line 2, in 
    from PIL import Image, ImageDraw, ImageFont
ModuleNotFoundError: No module named 'PIL'
(venv) boby@sok-01:~/work/powder (master)$

To fix the error install Pillow with

pip install Pillow

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *