<div>Hi!<br></div><div><br></div><div>  I have a virtualenv created with --no-site-packages option and I&#39;m going to install there Django and some required libs using buildout. The problematic library is PIL. Here is my buildout.cfg</div>
<div><br></div><div>[buildout]<br>parts = PIL django<br><br>[django]<br>recipe = djangorecipe<br>version = 1.1<br>project = project<br>eggs =<br>     psycopg2<br>     PIL<br>     south<br>     django-reversion<br>     django-cms<br>
wsgi = true<br>settings = production<br><br>[PIL]<br>recipe = zc.recipe.egg:custom<br>egg = PIL==1.1.6<br>find-links = <a href="http://dist.repoze.org">http://dist.repoze.org</a><br></div><div><br></div><div>and it is something generally recommended by other users. See: <a href="http://www.stereoplex.com/two-voices/a-django-development-environment-with-zc-buildout">http://www.stereoplex.com/two-voices/a-django-development-environment-with-zc-buildout</a></div>
<div><br></div><div>I also tried some other versions of [PIL] like:</div><div><div>[PIL]<br>recipe = zc.recipe.egg:custom<br>egg = PIL==1.1.6<br>find-links = <a href="http://dist.repoze.org/PIL-1.1.6.tar.gz">http://dist.repoze.org/PIL-1.1.6.tar.gz</a><br>
index = <a href="http://dist.repoze.org/index">http://dist.repoze.org/index</a><br></div><div><br></div><div><br></div><div>The first problem is that the above recipe installs PIL 1.1.7 instead of 1.1.6. Here is install log:</div>
<div><br></div><div>python bin/buildout -c devel.cfg <br>Updating django.<br>Getting distribution for &#39;PIL&#39;.<br>WARNING: &#39;&#39; not a valid package name; please use only.-separated package names in setup.py<br>
In file included from /usr/include/python2.6/Python.h:8,<br>                 from libImaging/ImPlatform.h:10,<br>                 from libImaging/Imaging.h:14,<br>                 from Tk/tkImaging.c:53:<br>/usr/include/python2.6/pyconfig.h:1028:1: warning: &quot;_POSIX_C_SOURCE&quot; redefined<br>
In file included from /usr/include/stdio.h:28,<br>                 from /usr/include/tcl.h:141,<br>                 from /usr/include/tk.h:21,<br>                 from Tk/tkImaging.c:51:<br>/usr/include/features.h:210:1: warning: this is the location of the previous definition<br>
--------------------------------------------------------------------<br>PIL 1.1.7 SETUP SUMMARY<br>--------------------------------------------------------------------<br>version       1.1.7<br>platform      linux2 2.6.4 (r264:75706, Oct 27 2009, 06:16:59)<br>
              [GCC 4.4.1]<br>--------------------------------------------------------------------<br>--- TKINTER support available<br>--- JPEG support available<br>--- ZLIB (PNG/ZIP) support available<br>--- FREETYPE2 support available<br>
--- LITTLECMS support available<br>--------------------------------------------------------------------<br>To check the build, run the selftest.py script.<br>zip_safe flag not set; analyzing archive contents...<br>Image: module references __file__<br>
Got PIL 1.1.7.<br></div><div><br></div><div>Second problem is that the above PIL installation doesn&#39;t work with Django:</div><div><br></div><div>bin/django validate<br>Error: One or more models did not validate:<br>picture.picture: &quot;image&quot;: To use ImageFields, you need to install the Python Imaging Library. Get it at <a href="http://www.pythonware.com/products/pil/">http://www.pythonware.com/products/pil/</a> .<br>
</div><div><br></div><div><br></div><div>At the same time, everything is ok when I manually install PIL using: pip install <a href="http://effbot.org/downloads/Imaging-1.1.6.tar.gz">http://effbot.org/downloads/Imaging-1.1.6.tar.gz</a></div>
<div><br></div><div>Any hints?</div><div>Jakub</div></div>