close

[Solved] ImportError: No module named PIL

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ImportError: No module named PIL in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ImportError: No module named PIL Error Occurs?

Today I get the following error ImportError: No module named PIL in python.

How To Solve ImportError: No module named PIL Error ?

  1. How To Solve ImportError: No module named PIL Error ?

    To Solve ImportError: No module named PIL Error On a different note, I can highly recommend the use of Pillow which is backwards compatible with PIL and is better maintained/will work on newer systems.

  2. ImportError: No module named PIL

    To Solve ImportError: No module named PIL Error On a different note, I can highly recommend the use of Pillow which is backwards compatible with PIL and is better maintained/will work on newer systems.

Solution 1

In shell, run:

pip install Pillow

Attention: PIL is deprecated, and pillow is the successor.

Solution 2

On a different note, I can highly recommend the use of Pillow which is backwards compatible with PIL and is better maintained/will work on newer systems.

When that is installed you can do

import PIL 

or

from PIL import Image

etc..

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read