[Pythonmac-SIG] Can't build PIL on Snow Leopard
Chris.Barker at noaa.gov
Fri Dec 4 01:52:25 CET 2009
Does anyone have a PIL binary for Python2.6.4? That would be the easiest
way to get it?
I built one for Frederik last spring, but I don't know what happened to
it, nor do I remember whether it was for py2.5 or py2.6
It's not too hard to do -- at least with 10.5 machine -- I have a
10.4.11 PP now, and macports does not build Universal right at this
Xiao Yu wrote:
> I apologize for not having caught onto the nuance of differences between the Apple system Python, python.org's Python and MacPort's Python yet.
> I have installed python.org's Python 2.6.4. I however have trouble building PIL on it.
> lipo: can't open input file: /var/tmp//ccmUAK0V.out (No such file or directory)
> error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1
> I am being told by the folks at comp.lang.python that the problem is because of missing libraries. Could someone please instruct me how to proceed? I couldn't google the proper procedures. My ultimate goal is to get my PyQt-PIL application working again.
That is likely. If you look at the error messages that came before, you
may find more details, but PIL does depend in a couple other libs that
Apple does not provide.
You will find a list of these libs in the PIL docs, and probably
discussion about Mac-specific issue in the archives of this list and
assorted Wikis -- do some goggling. I think you need libjpeg and
libfreetype, though freetype may now come with OS-X 10.6
The easiest way to get them is to use macports (or maybe fink).
If you just need it to work for you, then it's pretty easy. Use macports
to build libjpeg, and make sure the PIL build can find it, and away you go.
If you want to re-distribute, then you'll want to build the libd
Universal, which macports shoudl be able to do with:
port install libjpeg _universal
or something like that. Then you want make sure that PIL finds only the
static libs -- I think macports builds both, so you may need to go
delete the *.dylib versions so that they won't be found -- a kludge, but
gcc really tries hard to use dynamic libs.
Sorry I don't have time to do more right now!
Christopher Barker, Ph.D.
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
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG