Help installing PIL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help installing PIL

Isaac Feldman
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.

If that sounds like the culprit, can you tell me how I can get those for the Mac?  I've looked on the Python.org site but don't see any mention of those files.


Thanks,


Isaac

igloo multimedia  
simple by design
[hidden email]
http://igloomultimedia.com






_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Help installing PIL

Bruce Johnson

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:

<http://developer.apple.com/>

(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


_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Help installing PIL

Chris Barker
On 9/16/11 3:23 PM, Bruce Johnson wrote:
> On Sep 14, 2011, at 7:45 PM, Isaac Feldman wrote:
>> I am trying to install PIL 1.7.7 on Mac OS X 10.6 running python 2.7.2

> 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:
>
> <http://developer.apple.com/>

Correct, though PIL requires some dependencies as well, so it's not that
simple. What is simple is to use Russel Owen's "unofficial" binaries:


http://www.astro.washington.edu/users/rowen/python/

for python2.7, you want:

PIL-1.1.7-python.org-32bit-py2.7-macosx10.3.dmg


That is the build for the 32 bit PPC+Intel build of python from
python.org. Unless you really need 64 bit, that's the one I recommend.

-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[hidden email]
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Help installing PIL

Charlie Clark-6
Am 17.09.2011, 09:31 Uhr, schrieb Chris Barker <[hidden email]>:

> That is the build for the 32 bit PPC+Intel build of python from  
> python.org. Unless you really need 64 bit, that's the one I recommend.

Alternatively, if you install MacPorts installing binary packages are as  
easy as:

sudo port install py27-pil

or, even better once you have virtualenv installed:

virtualenv-2.7 --no-site-packages mypythonfolder
cd mypythonfolder
bin/pip install pillow

For most Python users I'd suggest MacPorts is the way to go because it  
handles necessary libraries and allows for uninstalling. Caveat is that  
 from Snow Leopard on the builds are generally x86_64 only.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig