I need to use ImageField in my models, and PIL doesn't seem to install:
>>> from PIL import Image Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named PIL
However, I see that a python image is installed in Synaptic. When I try to install it easily, I get:
$ sudo easy_install-2.7 PIL [sudo] password for glide: Searching for PIL Reading http://pypi.python.org/simple/PIL/ Reading http://www.pythonware.com/products/pil Reading http://effbot.org/zone/pil-changes-115.htm Reading http://effbot.org/downloads/#Imaging Best match: PIL 1.1.7 Downloading http://effbot.org/media/downloads/PIL-1.1.7.tar.gz Processing PIL-1.1.7.tar.gz Running PIL-1.1.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-HvRSQr/PIL-1.1.7/egg-dist-tmp-nDJHmU WARNING: '' not a valid package name; please use only.-separated package names in setup.py _imaging.c:3017: warning: initialization from incompatible pointer type _imaging.c:3077: warning: initialization from incompatible pointer type libImaging/Quant.c: In function 'rehash_collide': libImaging/Quant.c:154: warning: cast to pointer from integer of different size -------------------------------------------------------------------- PIL 1.1.7 SETUP SUMMARY -------------------------------------------------------------------- version 1.1.7 platform linux2 2.7.1 (r271:86832, May 2 2011, 14:22:06) [GCC 4.4.3] -------------------------------------------------------------------- *** TKINTER support not available *** JPEG support not available --- ZLIB (PNG/ZIP) support available *** FREETYPE2 support not available *** LITTLECMS support not available -------------------------------------------------------------------- To add a missing option, make sure you have the required library, and set the corresponding ROOT variable in the setup.py script. To check the build, run the selftest.py script. zip_safe flag not set; analyzing archive contents... Image: module references __file__ Adding PIL 1.1.7 to easy-install.pth file Installing pilconvert.py script to /usr/local/bin Installing pilprint.py script to /usr/local/bin Installing pildriver.py script to /usr/local/bin Installing pilfont.py script to /usr/local/bin Installing pilfile.py script to /usr/local/bin Installed /usr/local/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg Processing dependencies for PIL Finished processing dependencies for PIL
And this is still not applicable. Do I need to do something to use the ImageField field type?
source share