do you have libjpeg62-dev installed? i think PIL depends on that when compiling.
for ubuntu and other linuxes it's probably easier to use https://svn.plone.org/svn/collective/buildout/bda-naked-python/ instead of the osx centric https://svn.plone.org/svn/collective/buildout/python/ which i wasn't able to install on my box. with bda-naked-python on ubuntu do: $ sudo apt-get install build-essential $ sudo apt-get install libreadline5-dev $ sudo apt-get install zlib1g-dev $ sudo apt-get install libbz2-dev $ sudo apt-get install libssl-dev $ sudo apt-get install libjpeg62-dev $ python bootstrap.py --distribute $ ./bin/buildout and you will get python 2.6 and 2.4 installed as bin/python26 and bin/python24 ,,johannes raggam On Wed, 2010-05-26 at 17:04 +0200, Maurits van Rees wrote: > Hi all, > > So, the latest Ubuntu 10.04 (Lucid Lynx) no longer has python2.4 > packages. Luckily we have the python buildout, advertised more for the > Mac but working on Linux quite well too: > http://svn.plone.org/svn/collective/buildout/python > > PIL even gets installed. Plone 3 starts up fine when you create a > buildout with the python2.4 executable created in this way. But > uploading a jpeg file will work but fail to create a thumbnail, preview, > etcetera. This is because the _imaging module cannot be imported > because libjpeg cannot be found: > > $ python2.4 -c "import _imaging" > Traceback (most recent call last): > File "<string>", line 1, in ? > ImportError: libjpeg.so.7: cannot open shared object file: No such file > or directory > > Now, the libjpeg library *is* available in the python buildout. If I > tell python where to find this library, it works: > > $ LD_LIBRARY_PATH=/home/maurits/buildout/python/python-2.4/lib python2.4 > -c "import _imaging" > > That command exits without error. > > Does anyone know how to change the python buildout so this works without > needing to specify this LD_LIBRARY_PATH when running python? > > > I could probably add this to the environment-vars in the instance part > of the Plone buildout, but hardcoding '/home/maurits' in there seems > like a bad idea. At least when trying, this works, though it clobbers > any previously setting for LD_LIBRARY_PATH: > > environment-vars = > LD_LIBRARY_PATH /home/maurits/buildout/python/python-2.4/lib > > > Hm, I have not checked yet if the Universal Installers still work on > Ubuntu 10.04 and if they have solved it in a fine way already. Does > anyone know? > > > BTW, as Jarno de Wit pointed out to me, the following also works: > sudo ln -s /home/maurits/buildout/python/parts/opt/lib/libjpeg.so.7 > /usr/lib/libjpeg.so.7 > > But this makes it available for all programs of the system, and I have > heard from a colleague that after similar changes he was not able to > login in Ubuntu anymore; so this may be a bit dangerous, as it does not > restrict the changes to just Plone or even python, but makes them for > the whole operating system. > > > Alternatively, I hear that using python packages from the previous > Ubuntu works too. > > Cheers, > _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
