[Django]-Pip install PIL fails

92👍

Pillow is a maintained fork of PIL, so I recommend using Pillow. But you can’t have both installed at the same time.

  1. First, remove both PIL and Pillow.

  2. Then install Pillow with pip install pillow (although, depending on platform, you may need some prerequisites).

  3. Then make sure code is using from PIL import Image rather than import Image.

👤Hugo

14👍

You can try using Pillow instead, which is a PIL fork:

pip install Pillow

To import use following:

from PIL import Image
👤Rish

1👍

One solution that worked for me:

By simply installing the latest version of Pillow using pip install -U Pillow I can now call import PIL.Image

👤BAKYAC

1👍

I’m using PyCharm IDE, and I had this problem. I simply hovered my mouse to the ‘PIL’ and there’s a small pop-up. I clicked more actions and several options appear. I clicked ‘Install Pillow, and then, problem solved.

0👍

One solution was, right-click on ‘from PIL import Image’ and click
‘install Image’

I was on the PyCharm IDE.

Leave a comment