0

I am trying to import something from PIL:

from PIL import ImageTK, Image

But this error is flagged up:

ModuleNotFoundError: No module named 'PIL'

I have tried pip install PIL and easy_install PIL and the error is still flagged up pls can u help me? Im coding in Sublime text btw

Brian Destura
  • 11,487
  • 3
  • 18
  • 34
  • The problem seems to be that the install failed. What message did you get in response to `pip install PIL`? – BoarGules Jul 16 '21 at 07:16

3 Answers3

0

Try installing pillow, may be this can solve your issue:

pip install Pillow
Rohit_VE
  • 109
  • 5
0

You might have installed PIL in python2, but you are now in python3
You can install PIL for python3 by using pip3

pip3 install PIL

If this does not work, consider opening a virtual environment and install PIL there, it might work out.

MD Mushfirat Mohaimin
  • 1,966
  • 3
  • 10
  • 22
0

Error means no downloaded library so try to install the library. In the terminal enter:

pip install Pillow

or:

python -m pip install Pillow