Re: Python Image Library IOError - cannot find JPEG decoder?
On Feb 24, 9:34 am, Dario Traverso wrote: I've been trying to install the Python Image Library (PIL) on my Mac OSX Leopard laptop, but have been running into some difficulties. ... I've followed all of the installation instructions exactly. The build summary reported everything was "ok". What could be the problem here. Libjpeg-6b is not accessible? That would be my guess. It could be something obvious and something you have done, but it's worth asking: 1. Do you have the path to fink binaries, such as djpeg, in your shell PATH (e.g., /opt/local/bin for MacPorts)? 2. Did you set up the path to the libraries you linked with in the environment variable DYLD_LIBRARY_PATH? For example, DYLD_LIBRARY_PATH=/opt/local/lib for MacPorts 3. Did you execute your app with this variable available. $ env DYLD_LIBRARY_PATH=/opt/local/lib your-app Once you confirm what is missing you can write a Python wrapper to call your app with the right environment. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Image Library IOError - cannot find JPEG decoder?
On 24 fév, 18:34, Dario Traverso wrote: > I've been trying to install the Python Image Library (PIL) on my Mac > OSX Leopard laptop, but have been running into some difficulties. > > I've built the library, using the included setup.py script. The build > summary checks out ok, and sounds the option libraries to all be > found. I grabbed both libjpeg and freetype2 using fink. I did'nt build it, maybe you don't want too. I used the PIL package for Python 2.5 listed here: http://pythonmac.org/packages/py25-fat/index.html hth, Olivier -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Image Library IOError - cannot find JPEG decoder?
wongobongo wrote: On Feb 24, 9:34 am, Dario Traverso wrote: I've been trying to install the Python Image Library (PIL) on my Mac OSX Leopard laptop, but have been running into some difficulties. I've built the library, using the included setup.py script. The build summary checks out ok, and sounds the option libraries to all be found. I grabbed both libjpeg and freetype2 using fink. I did a similar thing, but not using Fink, on my mac (running osx 10.4) I documented the procedure I had to take to get it to work: http://www.razorvine.net/frog/user/irmen/article/2008-08-02/127 It's in Dutch but you can probably figure it out. I guess since you were on 10.5 that you have to adapt the 'DEPLOMENT_TARGET' variable in a suitable manner. Hope it helps, --irmen -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Image Library IOError - cannot find JPEG decoder?
On Feb 24, 9:34 am, Dario Traverso wrote: > I've been trying to install the Python Image Library (PIL) on my Mac > OSX Leopard laptop, but have been running into some difficulties. > > I've built the library, using the included setup.py script. The build > summary checks out ok, and sounds the option libraries to all be > found. I grabbed both libjpeg and freetype2 using fink. > > > PIL 1.1.6 BUILD SUMMARY > > version 1.1.6 > platform darwin 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) > [GCC 4.0.1 (Apple Inc. build 5465)] > > --- TKINTER support ok > --- JPEG support ok > --- ZLIB (PNG/ZIP) support ok > --- FREETYPE2 support ok > > > However, I then run the included self test, and 1 out of 57 tests > fails. I receive an IOError. Specifically: > > * > Failure in example: _info(Image.open("Images/lena.jpg")) > from line #24 of selftest.testimage > Exception raised: > Traceback (most recent call last): > File "./doctest.py", line 499, in _run_examples_inner > exec compile(source, "", "single") in globs > File "", line 1, in > File "./selftest.py", line 22, in _info > im.load() > File "PIL/ImageFile.py", line 180, in load > d = Image._getdecoder(self.mode, d, a, self.decoderconfig) > File "PIL/Image.py", line 375, in _getdecoder > raise IOError("decoder %s not available" % decoder_name) > IOError: decoder jpeg not available > 1 items had failures: > 1 of 57 in selftest.testimage > ***Test Failed*** 1 failures. > *** 1 tests of 57 failed. > > I've followed all of the installation instructions exactly. The build > summary reported everything was "ok". What could be the problem here. > Libjpeg-6b is not accessible? > > Thank you for any insight you can provide!! > > -Dario That would be my guess. Two things you may want to try: 1. Check that your Fink libraries and headers were used to make your PIL (check -I and -L settings on gcc after doing "python setup.py build_ext -i"). They should point to your Fink lib and include dirs. 2. Line 372 in PIL/Image.py has a debug print line. Try uncommenting that and see what comes out. That might give you some clues as to what is going on. You can always just call up Python in a terminal and try it out (from selftest.py doctests beginning on line 29). >>> import Image >>> def _info(im): ...im.load() ...return im.format, im.mode, im.size >>> im = Image.new("1", (128, 128)) >>> _info(im) (None, '1', (128, 128)) -- http://mail.python.org/mailman/listinfo/python-list
Python Image Library IOError - cannot find JPEG decoder?
I've been trying to install the Python Image Library (PIL) on my Mac OSX Leopard laptop, but have been running into some difficulties. I've built the library, using the included setup.py script. The build summary checks out ok, and sounds the option libraries to all be found. I grabbed both libjpeg and freetype2 using fink. PIL 1.1.6 BUILD SUMMARY version 1.1.6 platform darwin 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] --- TKINTER support ok --- JPEG support ok --- ZLIB (PNG/ZIP) support ok --- FREETYPE2 support ok However, I then run the included self test, and 1 out of 57 tests fails. I receive an IOError. Specifically: * Failure in example: _info(Image.open("Images/lena.jpg")) from line #24 of selftest.testimage Exception raised: Traceback (most recent call last): File "./doctest.py", line 499, in _run_examples_inner exec compile(source, "", "single") in globs File "", line 1, in File "./selftest.py", line 22, in _info im.load() File "PIL/ImageFile.py", line 180, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File "PIL/Image.py", line 375, in _getdecoder raise IOError("decoder %s not available" % decoder_name) IOError: decoder jpeg not available 1 items had failures: 1 of 57 in selftest.testimage ***Test Failed*** 1 failures. *** 1 tests of 57 failed. I've followed all of the installation instructions exactly. The build summary reported everything was "ok". What could be the problem here. Libjpeg-6b is not accessible? Thank you for any insight you can provide!! -Dario -- http://mail.python.org/mailman/listinfo/python-list