PIL problem after installation

L

Lad

I installed PIL under Linux but now when I try it I get the error:

decoder jpeg not available
How can I correct that problem?

Thank you for help
L.
 
F

Fredrik Lundh

Lad said:
I installed PIL under Linux but now when I try it I get the error:

decoder jpeg not available
How can I correct that problem?

if you built PIL yourself, the setup script told you how to fix this.

- make sure you have right libraries installed (see the
"prerequisites" section in the README)

- run setup and read the BUILD SUMMARY report carefully

- if the setup script cannot find a component, you'll have to edit
the setup.py file and set the appropriate ROOT variable. see in-
structions in the setup.py file for details.

if you got a binary release, complain to the distributor.

</F>
 
V

vasudevram

Probably the jpeg library - libjpeg is not present on your system.
Search Google for it, then download and install it. Try
http://rpmfind.net also to find it:

http://rpmfind.net/linux/rpm2html/search.php?query=libjpeg&submit=Search+...

But Fredrik's advice is very good - whenever installing a software
package, make sure to read the installation guide, release notes, etc -
carefully, and then do accordingly. This can save you a lot of time and
rework.

---------------------------------------------------------------------------­----------------

Vasudev Ram
Independent software consultant
Personal site: http://www.geocities.com/vasudevram
PDF conversion tools: http://sourceforge.net/projects/xtopdf
---------------------------------------------------------------------------­----------------
 
L

Lad

Fredrik said:
if you built PIL yourself, the setup script told you how to fix this.

- make sure you have right libraries installed (see the
"prerequisites" section in the README)

- run setup and read the BUILD SUMMARY report carefully

- if the setup script cannot find a component, you'll have to edit
the setup.py file and set the appropriate ROOT variable. see in-
structions in the setup.py file for details.

Fredrik,
Thank you for the reply.
So I did the following:

1.
I downloaded jpeg (from ftp://ftp.uu.net/graphics/jpeg/ ) source
libraries( file jpegsrc.v6b.tar.gz) and installed them. Now in
/usr/local/lib I have the following files: cjpeg
,djpeg,jpegtran,rdjpgcom and wrjpgcom
2.
I opened setup.py file in Imaging 1.1.5 directory
and changed JPEG_ROOT =None into
JPEG_ROOT = "/usr/local/lib/"

3.ran python setup.py build_ext -i
but it still says

*** JPEG support not available

What did I wrong?
Can you please help?
Thank you
L.
 
F

Fredrik Lundh

Lad said:
I downloaded jpeg (from ftp://ftp.uu.net/graphics/jpeg/ ) source
libraries( file jpegsrc.v6b.tar.gz) and installed them. Now in
/usr/local/lib I have the following files: cjpeg
,djpeg,jpegtran,rdjpgcom and wrjpgcom

cjpeg, djpeg etc are executables, not libraries. if you have them under
/usr/local/lib, something's not quite right.

to save some time, I suggest looking for a jpeg-dev or jpeg-devel
package in the package repository for your platform.

</F>
 
L

Lad

Fredrik said:
cjpeg, djpeg etc are executables, not libraries. if you have them under
/usr/local/lib, something's not quite right.

to save some time, I suggest looking for a jpeg-dev or jpeg-devel
package in the package repository for your platform.

</F>

Hello Fredrik,
Thank you for your reply.
I installed jpeg-devel package and now selftest.py worked!
But I want to use PIL in my Python program( Django) running under
Apache. What permissions must I use for which files?
Thank you very much for your help.
regards,
L,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top