Reputation: 22777
I want to use the ImageField in Django and I was told to install Pillow rather than PIL. I installed Pillow by doing this
pip install Pillow
and then when I ran the server, it said
To use ImageFields, you need to install PIL
but I was told it should work with just having Pillow. I did further research and I read that I should try
pip install Pillow-PIL
and I tried that and it still have the same error. I tried import it in models.py like this:
from PIL import Image
but then it gave an error saying 'No module named PIL'. What am I doing wrong? On another SO post, a user said
Did you install Pillow into your system site-packages? or into a virtualenv's site-packages?
How do I confirm that Pillow is installed into my system site-packages?
Note: I am using Django 1.5, Python 2.7 and not using virtualenv.
Upvotes: 0
Views: 1287
Reputation: 3733
First to check whether any package is installed use:
pip freeze
libjpeg-dev is required for PIL to process jpeg format. Use the following link for any other PIL errors: https://stackoverflow.com/a/10109941/2323987
Upvotes: 1