[Image-SIG] help! decoder jpeg not available

Pan,YueQun yuequnpan at myspace.cn
Thu Nov 6 03:46:08 CET 2008


In gentoo linux, the install is ok ,build information is: 

running build

running build_py

running build_ext

--------------------------------------------------------------------

PIL 1.1.6 BUILD SUMMARY

--------------------------------------------------------------------

version       1.1.6

platform      linux2 2.4.3 (#1, Apr 17 2007, 02:26:48)

              [GCC 4.1.1 (Gentoo 4.1.1-r3)]

--------------------------------------------------------------------

*** TKINTER support not available

--- JPEG support ok

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

 

To check the build, run the selftest.py script.

running build_scripts

 

$ python selftest.py

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, "<string>", "single") in globs

  File "<string>", 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 install the jpeg-6b package,the install information is as follows:

$./configure --enable-shared --enable-static CFLAGS='-g' 

 

checking for gcc... gcc

checking whether the C compiler (gcc -g ) works... yes

checking whether the C compiler (gcc -g ) is a cross-compiler... no

checking whether we are using GNU C... yes

checking how to run the C preprocessor... gcc -E

checking for function prototypes... yes

checking for stddef.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for size_t... yes

checking for type unsigned char... yes

checking for type unsigned short... yes

checking for type void... yes

checking for working const... yes

checking for inline... __inline__

checking for broken incomplete types... ok

checking for short external names... ok

checking to see if char is signed... yes

checking to see if right shift is signed... yes

checking to see if fopen accepts b spec... yes

checking for a BSD compatible install... /usr/bin/install -c

checking for ranlib... ranlib

checking host system type... x86_64-unknown-linux-gnu

checking for ranlib... ranlib

checking for gcc... gcc

checking whether we are using GNU C... yes

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc static flag -static works... -static

checking whether ln -s works... yes

checking for ld used by GCC...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/b
in/ld

checking if the linker
(/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/
bin/ld) is GNU ld... yes

checking whether the linker
(/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/
bin/ld) supports shared libraries... yes

checking for BSD-compatible nm... /usr/bin/nm -B

checking command to parse /usr/bin/nm -B output... yes

checking how to hardcode library paths into programs... immediate

checking for
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/b
in/ld option to reload object files... -r

checking dynamic linker characteristics... Linux ld.so

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking for objdir... .libs

creating libtool

checking libjpeg version number... 62

creating ./config.status

creating Makefile

creating jconfig.h

jconfig.h is unchanged

 

$make

$make test

 

rm -f testout*

./djpeg -dct int -ppm -outfile testout.ppm  ./testorig.jpg

./djpeg -dct int -bmp -colors 256 -outfile testout.bmp  ./testorig.jpg

./cjpeg -dct int -outfile testout.jpg  ./testimg.ppm

./djpeg -dct int -ppm -outfile testoutp.ppm ./testprog.jpg

./cjpeg -dct int -progressive -opt -outfile testoutp.jpg ./testimg.ppm

./jpegtran -outfile testoutt.jpg ./testprog.jpg

cmp ./testimg.ppm testout.ppm

cmp ./testimg.bmp testout.bmp

cmp ./testimg.jpg testout.jpg

cmp ./testimg.ppm testoutp.ppm

cmp ./testimgp.jpg testoutp.jpg

cmp ./testorig.jpg testoutt.jpg

 

$sudo make install

/usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h

/usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h

/usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h

/usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h

./libtool --mode=install /usr/bin/install -c libjpeg.la
/usr/local/lib/libjpeg.la

/usr/bin/install -c .libs/libjpeg.so.62.0.0
/usr/local/lib/libjpeg.so.62.0.0

rm -f /usr/local/lib/libjpeg.so.62 /usr/local/lib/libjpeg.so

(cd /usr/local/lib && ln -s libjpeg.so.62.0.0 libjpeg.so.62)

(cd /usr/local/lib && ln -s libjpeg.so.62.0.0 libjpeg.so)

/usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la

/usr/bin/install -c .libs/libjpeg.a /usr/local/lib/libjpeg.a

ranlib /usr/local/lib/libjpeg.a

chmod 644 /usr/local/lib/libjpeg.a

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/
bin:/sbin" ldconfig -n /usr/local/lib

------------------------------------------------------------------------
------

Libraries have been installed in:

   /usr/local/lib

 

To link against installed libraries in a given directory, LIBDIR,

you must use the `-LLIBDIR' flag during linking.

 

 You will also need to do one of the following:

   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable

     during execution

   - add LIBDIR to the `LD_RUN_PATH' environment variable

     during linking

   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag

   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

 

See any operating system documentation about shared libraries for

more information, such as the ld(1) and ld.so(8) manual pages.

------------------------------------------------------------------------
------

./libtool --mode=install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg

/usr/bin/install -c .libs/cjpeg /usr/local/bin/cjpeg

./libtool --mode=install /usr/bin/install -c djpeg /usr/local/bin/djpeg

/usr/bin/install -c .libs/djpeg /usr/local/bin/djpeg

./libtool --mode=install /usr/bin/install -c jpegtran
/usr/local/bin/jpegtran

/usr/bin/install -c .libs/jpegtran /usr/local/bin/jpegtran

./libtool --mode=install /usr/bin/install -c rdjpgcom
/usr/local/bin/rdjpgcom

/usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom

./libtool --mode=install /usr/bin/install -c wrjpgcom
/usr/local/bin/wrjpgcom

/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

 

It seems everything is OK ,but it doesn't work!

 

I run in my own program, the error information is as follows:

Traceback (most recent call last):

  File "ImageRecog.py", line 2, in ?

    img = Image.open(sys.argv[1]).convert('YCbCr')

  File "/usr/lib64/python2.4/site-packages/PIL/Image.py", line 653, in
convert

    self.load()

  File "/usr/lib64/python2.4/site-packages/PIL/ImageFile.py", line 155,
in load

    self.load_prepare()

  File "/usr/lib64/python2.4/site-packages/PIL/ImageFile.py", line 223,
in load_prepare

    self.im = Image.core.new(self.mode, self.size)

  File "/usr/lib64/python2.4/site-packages/PIL/Image.py", line 36, in
__getattr__

    raise ImportError("The _imaging C module is not installed")

ImportError: The _imaging C module is not installed

 

and it's true that the _imaging model not exists!

 

Can you help me? 

 

thanks!

                                                           Yuequn Pan

 



*** Attention ***
This electronic mail including attachments is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or legally privileged material and information. Unauthorized disclosure, copying, distribution or use of this material and information may be unlawful and is prohibited. If you are not the intended recipient and have received this mail in error, please contact the sender and delete all contents of the e-mail as well as any copies made.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20081106/5176ea53/attachment-0001.htm>


More information about the Image-SIG mailing list