92👍
Pillow is a maintained fork of PIL, so I recommend using Pillow. But you can’t have both installed at the same time.
-
First, remove both PIL and Pillow.
-
Then install Pillow with
pip install pillow
(although, depending on platform, you may need some prerequisites). -
Then make sure code is using
from PIL import Image
rather thanimport Image
.
14👍
You can try using Pillow instead, which is a PIL fork:
pip install Pillow
To import use following:
from PIL import Image
- [Django]-Elegant setup of Python logging in Django
- [Django]-How to reset db in Django? I get a command 'reset' not found error
- [Django]-Django apps aren't loaded yet when using asgi
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
- [Django]-How can I use redis with Django?
- [Django]-Django model object with foreign key creation
- [Django]-Django ModelForm with extra fields that are not in the model
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.
- [Django]-PyCharm: DJANGO_SETTINGS_MODULE is undefined
- [Django]-Django filter JSONField list of dicts
- [Django]-Django Rest Framework custom response message
0👍
One solution was, right-click on ‘from PIL import Image’ and click
‘install Image’
I was on the PyCharm IDE.
- [Django]-Django Rest Framework remove csrf
- [Django]-Django SUM Query?
- [Django]-What does on_delete do on Django models?