[Image-SIG] Mac support for PIL

Paul Ross paul at paulross.demon.co.uk
Sat May 8 21:04:31 CEST 2010


Thanks, and sorry, what I meant to say is that PIP is really easy to install on windows but a bit of a trial on Mac.

There are loads of blog entries around, which perhaps reflects the trouble that people are having. Many of these entries are highly version specific and have a less than unity probability of success (I tried three before I managed to get things working). Judging by the comment on most blogs other people are in the same boat as I.

FWIW this is what eventually worked for me:
Based on: http://rezmuh.sixceedinc.com/2009/04/setting-up-pil-with-libjpeg-on-mac-os-x-leopard.html

I got and installed MacPorts-1.8.2-10.6-SnowLeopard.dmg from:
http://distfiles.macports.org/MacPorts/

Then in Imaging-1.1.7:

In setup.py  changed the JPEG_ROOT to:
JPEG_ROOT = "/opt/local/lib/libjpeg.dylib"

Then:
sudo python setup.py build --force
sudo python setup.py install

I would not guarantee this will work for others!

Thanks for the help and thanks for such a great product as PIL

Regards,

Paul.

FWIW I s
On 7 May 2010, at 16:05, Yury V. Zaytsev wrote:

> Hi!
> 
> On Wed, 2010-05-05 at 21:42 +0100, Paul Ross wrote:
>> 
>> I know that PIL is Windows-centric but is there any chance that it will
>> support Snow Leopard on Apple Mac some time soon?
> 
> Windows-centric?!
> 
>> I have googled for the answer for a couple of hours now and tried many
>> ad-hoc things (deleting PIL, installing libjpeg etc. etc.) but I
>> always just get "IOError: decoder jpeg not available" whenever I try
>> and manipulate JPEG images
> 
> Basically you have to build and install libjpeg and other decoders from
> source or use a package management system, such as Fink or Macports,
> then rebuild PIL against them.
> 
> If you want more help, ask specific questions.
> 
> -- 
> Sincerely yours,
> Yury V. Zaytsev
> 



More information about the Image-SIG mailing list