PIL problem after installation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lad

    #1

    PIL problem after installation

    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.

  • Fredrik Lundh

    #2
    Re: PIL problem after installation

    Lad wrote:
    [color=blue]
    > 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?[/color]

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

    - make sure you have right libraries installed (see the
    "prerequisi tes" 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>

    Comment

    • vasudevram

      #3
      Re: PIL problem after installation


      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/se...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
      ---------------------------------------------------------------------------­----------------





      Fredrik Lundh wrote:[color=blue]
      > Lad wrote:
      >[color=green]
      > > 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?[/color]
      >
      > if you built PIL yourself, the setup script told you how to fix this.
      >
      > - make sure you have right libraries installed (see the
      > "prerequisi tes" 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>[/color]

      Comment

      • Lad

        #4
        Re: PIL problem after installation


        Fredrik Lundh wrote:[color=blue]
        > Lad wrote:
        >[color=green]
        > > 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?[/color]
        >
        > if you built PIL yourself, the setup script told you how to fix this.
        >
        > - make sure you have right libraries installed (see the
        > "prerequisi tes" 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.[/color]

        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.

        Comment

        • peter

          #5
          Re: PIL problem after installation

          I had similar problems a couple of months back when I was teaching
          myself Tkinter and PIL. I wrote up my experiences here:-




          If you look at the section on Images you will see how I eventually
          solved it (with bucket loads of help from this forum)

          Good luck

          Peter

          Comment

          • Fredrik Lundh

            #6
            Re: PIL problem after installation

            Lad wrote:
            [color=blue]
            > 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[/color]

            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>

            Comment

            • Lad

              #7
              Re: PIL problem after installation


              Fredrik Lundh wrote:[color=blue]
              > Lad wrote:
              >[color=green]
              > > 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[/color]
              >
              > 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>[/color]

              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,

              Comment

              Working...