Friday, November 20, 2009

Python Imaging Library (PIL) with Plone 4 on OS X

The Python Imaging Library (PIL) was not working for me with the Python 2.6 packages that I installed on OS X Leopard.

I resisted for a while, but in the end the solution to my PIL problems on OS X was to compile Python 2.6.

I'm assuming that the following are already installed
  • XCode should be installed
  • Subversion (I use fink to get and install subversion)
I downloaded Python 2.6 from the python.org website

http://python.org/ftp/python/2.6.4/Python-2.6.4.tar.bz2

Then I unpacked and compiled:

tar xvfj Python-2.6.4.tar.bz2
cd Python-2.6.4
./configure && make
sudo make install

Using this version of python (which gets installed to /usr/local/bin) I was able to bootstrap the Plone 4 and compile PIL:

svn co http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0 plone4
cd plone4
PYTHON=/usr/local/bin/python
$PYTHON bootstrap.py
bin/buildout -c pil.cfg

No comments:

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos