I am trying to get PIL working with Django 1.2.1 and Python 2.7 on Snow Leopard
I have followed instructions I found here on SO and I should be doing it right.
The imports and selftest.py works fine and I both save and open images in the interactive python, but Django cannot use it.
I get the error
The _imaging C module is not installed
Why on earth does PIL seem to work everywhere but Django? I just doesn't make any sense.
I have even tried reinstalling Django after installing libjpeg and PIL, but with no results, what am I doing wrong?
EDIT: I have just discovered something weird. I can open and save images just fine, by using the interactive python in terminal. But for some reason, when I save an image, the colors are inverted!
The code used is:
im = Image.open("/Users/Me/Downloads/9.jpg")
im.save("/Users/Me/Downloads/8.jpg")
Does that give any clues as to why it does not work in Django at all?
EDIT 2: Nevermind that last part, it seems that the jpg I chose, was with CMYK colors, and that cannot be saved directly as an RGB or something along those lines.
EDIT 3: And then again, maybe it is correct that Django is looking in the wrong place.
Exception Location: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/Image.py in __getattr__, line 36
Python Executable: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.0
This is what Django puts out. I just looked at the version, silly me. The top line clearly states that it is looking in the 2.5 path. Wonder why its 2.5 since SL should be born with 2.6, oh well, no matter.
Can anyone then tell me how to direct Django to use the newer ones? The solution with changing manage.py
did nothing. Why is that, that should have told Django to use 2.7 no matter what.. right?