[Image-SIG] How can I get Python to recognise the ijg jpeg
libraries?
Hannu Krosing
hannu@tm.ee
Thu, 03 Feb 2000 01:01:35 +0200
Robert Moloney wrote:
>
> Hi,
>
> How can I get Python to recognise the ijg jpeg libraries?
>
> I have Suse linux 6.1 I used RPM files to install PIL and Python.
> The IJG Jpeg libraries were alreay on the machine. When I try to
> manipulate a jpeg file it gives a decode error -2. When I do a
> dir(_imaging) jpeg_decoder and jpeg_encoder appear in the list.
>
There seems to be something wrong with rpm-s ;(
I had to solve the same problem yesterday for using Zope's Photo product.
I did it on RH6.1
That's what I had to do.
download the PIL 1.0 tar.gz from it's homesite
extract it
cd libImaging
./configure
make
cd ..
make -f Makefile.pre.in.boot
If you don't want TK support or there are conflicts (as I had) then edit the
resulting Makefile and remove all references to tkImaging and
other tcl/tk stuff (just uncommenting it from Setup.in won't work, complains
about *noobject* somewhere)
copy the stuff to /usr/lib/python1.5/site-packages/PIL as instructed by
README.
It could be wise to run
python -c "import
compileall;compile_dir('/usr/lib/python1.5/site-packages/PIL')"
to compile all the python modules in PIL while you are root
-----------------
Hannu