Reputation: 48599
I'm trying to do the Tango with Django tutorial, which uses django 1.5. I'm using virtualenvwrapper. I installed Pillow with pip.
$ pip freeze
Django==1.5.5
Pillow==2.4.0
South==0.8.4
wsgiref==0.1.2.
(tangowithdjango)~/dev_django_projects/tangowithdjango$ which python
/Users/7stud/.virtualenvs/tangowithdjango/bin/python
(tangowithdjango)~/dev_django_projects/tangowithdjango$ python --version
Python 2.7.6
However, in chapter 8 I get the following error:
(tangowithdjango)~/dev_django_projects/tangowithdjango$ ./manage.py syncdb
CommandError: One or more models did not validate: rango.userprofile: "picture": To use ImageFields, you need to install the Python Imaging Library...
I am unable to install PIL, which is why I installed Pillow:
(tangowithdjango)~/dev_django_projects/tangowithdjango$ pip install PIL
Downloading/unpacking PIL
Could not find any downloads that satisfy the requirement PIL
Some externally hosted files were ignored (use --allow-external PIL to allow).
Cleaning up...
No distributions at all found for PIL
Storing debug log for failure in /Users/7stud/.pip/pip.log
When I try:
$ pip install Pillow-PIL
which is supposed to convert buggy import statements into good import statements, I get the error:
Could not find a version that satisfies the requirement Pillow-PIL (from versions: 0.1dev)
Finally, if I try to use PIL in the shell:
(tangowithdjango)~/dev_django_projects/tangowithdjango$ ./manage.py shell
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from PIL import Image
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/7stud/.virtualenvs/tangowithdjango/lib/python2.7/site-packages/PIL/Image.py", line 53, in <module>
from PIL import _imaging as core
ImportError: dlopen(/Users/7stud/.virtualenvs/tangowithdjango/lib/python2.7/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /Users/7stud/.virtualenvs/tangowithdjango/lib/python2.7/site-packages/PIL/_imaging.so
Expected in: flat namespace
in /Users/7stud/.virtualenvs/tangowithdjango/lib/python2.7/site-packages/PIL/_imaging.so
>>>
Upvotes: 2
Views: 3677
Reputation: 18202
pip install PIL --allow-external PIL --allow-unverified PIL
Upvotes: 5