[Image-SIG] Help installing PIL

Bruce Johnson johnson at pharmacy.arizona.edu
Sat Sep 17 00:23:45 CEST 2011

On Sep 14, 2011, at 7:45 PM, Isaac Feldman wrote:

> Hi,
> I am trying to install PIL 1.7.7 on Mac OS X 10.6 running python 2.7.2
> I am getting the following error: 
>> $ python setup.py build_ext -i
>> running build_ext
>> --- using frameworks at /System/Library/Frameworks
>> building '_imaging' extension
>> gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/sw/include/freetype2 -I/sw/include -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.3-fat-2.7/_imaging.o
>> unable to execute gcc-4.0: No such file or directory
>> error: command 'gcc-4.0' failed with exit status 1
> I think it is because I don't have Python's build support files "python-dev", "python-devel", or similar. 

No, it's because you don't have gcc-4.0 or at least don't have it on your $PATH.

You need to have Apple's Developer Tools installed or build up a dev environment with MacPorts to do this.

It's simplest to just install Apples dev tools:


(note, you do NOT need the $99 Mac Developer Program to download the dev tools. You DO need to pay the $99 if you want to put your apps on the App Store.)

Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs

More information about the Image-SIG mailing list