PIL (etc etc etc) on OS X
David C. Ullrich
dullrich at sprynet.com
Mon Aug 4 16:28:56 EDT 2008
Just as well that the message sent earlier today
seems to have been lost...
Ok. Read your instructions on libjpeg. Read some
of the install.doc. ./configure, fine. make, fine.
"make test", fine. So I said "sudo make install"
and this happened:
0-1d-4f-fc-28-d:jpeg-6b dullric$ sudo make install
Password:
/usr/bin/install -c cjpeg /usr/local/bin/cjpeg
/usr/bin/install -c djpeg /usr/local/bin/djpeg
/usr/bin/install -c jpegtran /usr/local/bin/jpegtran
/usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
/usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom
/usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1
/usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1
/usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1
/usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1
/usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1
Surely that means it was installed in /usr/local/bin, right?
So I start over with PIL. It says I should "python setup.py build_ext
-i".
So I do:
0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python setup.py build_ext -i
running build_ext
--- using frameworks at /System/Library/Frameworks
--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform darwin 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)]
--------------------------------------------------------------------
--- TKINTER support ok
*** JPEG support not available
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
So I look in setup.py and I find this:
# Library pointers.
#
# Use None to look for the libraries in well-known library locations.
# Use a string to specify a single directory, for both the library and
# the include files. Use a tuple to specify separate directories:
# (libpath, includepath). Examples:
#
# JPEG_ROOT = "/home/libraries/jpeg-6b"
# TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
#
# If you have "lib" and "include" directories under a common parent,
# you can use the "libinclude" helper:
#
# TIFF_ROOT = libinclude("/opt/tiff")
FREETYPE_ROOT = None
JPEG_ROOT = None
#JPEG_ROOT = "/usr/local/bin"
I try it both ways, with JPEG_ROOT=None and
JPEG_ROOT = "/usr/local/bin" - same result
both times, "JPEG support not available".
Any thoughts?
Later in setup.py it says
if find_library_file(self, "jpeg"):
feature.jpeg = "jpeg"
elif sys.platform == "win32" and find_library_file(self,
"libjpeg"):
feature.jpeg = "libjpeg" # alternative name
Not knowing exactly what "find_library_file" does I
couldn't say, but it almost sounds like it's looking
for a file named "jpeg". The summary from the jpeg
install looks like it didn't install any such file.
Maybe "jpeg" should be the name of one of those files
that did get installed?
This _is_ fun. Eech.
DU.
--
David C. Ullrich
More information about the Python-list
mailing list