April 30th, 2009
After upgrading my local machines to Ubuntu Jaunty, I found that all of my Plone test environments failed to start. It turns out that Ubuntu packages such a python-imaging, python-xml and python-ldap quietly drop support for python 2.4 in Jaunty. Here is how I got Plone running.
We run a mixture of Plone 3.0.x and 3.1.x at the moment. We use buildout for Plone 3.1 and the old ‘static’ install method for Plone 3.0 (stick stuff in the Products directory). This technique works for both cases.
After flailing around in a mild panic for a while, I found an article by Maurits van Rees thatt mentions a couple of techniques to deal with Plone on Jaunty. This put me on to the Ubuntu python-virtualenv package that provides a tool to create custom python setups. This turned out to be an excellent way of controlling my python2.4 packages:
sudo apt-get install python-virtualenv
Create an environment:
virtualenv -v -p python2.4 ~/apps/py24
Easy_setup did’t seem to work for libxml2 suport, so I did it the old-fashioned way instead:
Unzip that, cd into the ‘python’ subdirectory inside it, and:
~/apps/py24/bin/python ./setup.py install
PIL was equally obstinate. PIL complains about not having JPEG and Freetype support if you don’t install these first (perhaps you don’t need them – I didn’t care to find out):
sudo apt-get install libjpeg-dev libfreetype6-dev
… unzip … cd in …
~/apps/py24/bin/python setup.py install
Modifying your Zope instances to use the new python environment is easy. If using buildout:
~/apps/py24/bin/python bootstrap.py ./bin/buildout
Otherwise you need to change the location of the python executable in all of your Zope startup scripts (i.e. zopectl, etc.).
Finally, if you need LDAP support: