PIL (etc etc etc) on OS X

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David C. Ullrich

    PIL (etc etc etc) on OS X

    Decided to try to install PIL on my Mac (OS X.5).

    I know nothing about installing programs on Linux,
    nothing about building C programs, nothing about
    installing libraries, nothing about "fink", nothing
    about anything. Please insert question marks after
    every sentence:

    I saw a "BUILDME" with instructions "for lazy programmers".
    I did that. It seems that everything worked except a
    jpg library is missing.

    I read that I need to install libjpeg. I read that on OS X
    this is "usually" done using fink. Great:

    (i) The idea of installing fink scares me, for no reason
    I could name. There's no way that's going to confuse the
    rest of Darwin, right?

    (ii) When I look at the fink website I see a list of
    supported libraries, not including libjpeg.

    I hate messing with things that I don't understand at _all_...

    Thanks for any advice or comments.

    DU.

    *************** *************** *************** *************** ******

    PIL 1.1.6 BUILD SUMMARY
    --------------------------------------------------------------------
    version 1.1.6
    platform darwin 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
    [GCC 4.0.1 (Apple Inc. build 5465)]
    --------------------------------------------------------------------
    --- TKINTER support ok
    *** JPEG support not available
    --- 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.
    0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python selftest.py
    *************** *************** *************** *************** *****
    Failure in example: _info(Image.ope n("Images/lena.jpg"))
    from line #24 of selftest.testim age
    Exception raised:
    Traceback (most recent call last):
    File "./doctest.py", line 499, in _run_examples_i nner
    exec compile(source, "<string>", "single") in globs
    File "<string>", line 1, in <module>
    File "./selftest.py", line 22, in _info
    im.load()
    File "PIL/ImageFile.py", line 180, in load
    d = Image._getdecod er(self.mode, d, a, self.decodercon fig)
    File "PIL/Image.py", line 375, in _getdecoder
    raise IOError("decode r %s not available" % decoder_name)
    IOError: decoder jpeg not available
    1 items had failures:
    1 of 57 in selftest.testim age
    ***Test Failed*** 1 failures.
    *** 1 tests of 57 failed.

    --
    David C. Ullrich
  • Kevin Walzer

    #2
    Re: PIL (etc etc etc) on OS X

    David C. Ullrich wrote:
    Decided to try to install PIL on my Mac (OS X.5).
    OK, sounds good.
    >
    I know nothing about installing programs on Linux,
    nothing about building C programs, nothing about
    installing libraries, nothing about "fink", nothing
    about anything. Please insert question marks after
    every sentence:
    For the record, OS X isn't Linux--it's a variant of BSD Unix. Similar,
    but no identical, to Linux.
    >
    I saw a "BUILDME" with instructions "for lazy programmers".
    I did that. It seems that everything worked except a
    jpg library is missing.
    OK.
    >
    I read that I need to install libjpeg. I read that on OS X
    this is "usually" done using fink. Great:
    >
    (i) The idea of installing fink scares me, for no reason
    I could name. There's no way that's going to confuse the
    rest of Darwin, right?
    You don't really need Fink just to install libjpeg. You do need the
    developer tools (Xcode) installed, otherwise you can't build any
    software at all.

    Libjpeg can be downloaded from http://www.ijg.org/. Download it,
    untar/unzip it. Fire up terminal, cd to the libjpeg directory, and type
    these commands:

    configure
    make
    sudo make install

    That should get libjpeg built and installed.
    >
    (ii) When I look at the fink website I see a list of
    supported libraries, not including libjpeg.
    So don't worry about Fink.
    >
    I hate messing with things that I don't understand at _all_...
    Well, that's understandable, but this is your chance to learn something
    new.
    >
    Thanks for any advice or comments.
    >
    DU.
    >
    --Kevin

    --
    Kevin Walzer
    Code by Kevin

    Comment

    • Irmen de Jong

      #3
      Re: PIL (etc etc etc) on OS X


      David C. Ullrich wrote:
      Decided to try to install PIL on my Mac (OS X.5).
      >
      I know nothing about installing programs on Linux,
      nothing about building C programs, nothing about
      installing libraries, nothing about "fink", nothing
      about anything. Please insert question marks after
      every sentence:
      Not needed.
      Just download a precompiled installation package from http://pythonmac.org/packages/

      I just installed PIL 1.1.6 two days ago, using the Python 2.5 package from this site :)
      (OS X 10.4.11 on a PPC mac mini)

      --irmen

      Comment

      • David C. Ullrich

        #4
        Re: PIL (etc etc etc) on OS X

        In article <489388af$0$498 80$e4fe514c@new s.xs4all.nl>,
        Irmen de Jong <irmen.NOSPAM@x s4all.nlwrote:
        David C. Ullrich wrote:
        Decided to try to install PIL on my Mac (OS X.5).

        I know nothing about installing programs on Linux,
        nothing about building C programs, nothing about
        installing libraries, nothing about "fink", nothing
        about anything. Please insert question marks after
        every sentence:
        >
        Not needed.
        Just download a precompiled installation package from
        http://pythonmac.org/packages/
        Lovely - thanks.
        I just installed PIL 1.1.6 two days ago, using the Python 2.5 package from
        this site :)
        (OS X 10.4.11 on a PPC mac mini)
        >
        --irmen
        --
        David C. Ullrich

        Comment

        • David C. Ullrich

          #5
          Re: PIL (etc etc etc) on OS X

          From the other reply it seems I may not need to worry
          about any of this. Otoh I've had issues with pythonmac
          versus OSX versions, etc, in the past. Just in case,
          also in the spirit of that curious idea that learning
          things is good:

          First, it occurred to me that I've got wxPython installed
          and it includes jpeg support. I don't suppose that means that
          wxPython has already put a libjpeg somewhere and I just
          need to tell PIL where it is?

          Regardless, about your suggestions below (again,
          any assertions here are really questions):

          Presumably jibjpeg needs to be unzipped into its own
          directory, or configure/make etc wouldn't be able to
          figure out what I want to make. Presumably that happens
          automatically when I unzip it.

          Then after I do the configure/make/sudo make install will
          libjpeg automatically be in some standard place? If not,
          what's a good choice of standard place to put it, and
          how do I put it there? (If I start here then it will
          unzip to there, and then after I make it there it will
          be installed in this third place, which is where I want
          it.)

          Thanks. Sorry to be so dumb - yes, it's perfectly reasonable
          for eff to assume that people using PIL are programmers.
          With a "new thing" in, say, Python I'd just try something
          and then figure out what to try next to make it work - I
          don't want to take that approach here lest I re-make
          part of Darwin or something. Once many years ago I
          learned a new thing: Attempting to run a sufficiently
          invalid DOS exe could cause physical damage to a hard
          drive... that wasn't the only thing I learned that day.

          (Probably won't get back to this til Monday, btw, in
          case you say something and I don't seem interested.)

          DU.

          In article <489379A7.50600 09@codebykevin. com>,
          Kevin Walzer <kw@codebykevin .comwrote:
          David C. Ullrich wrote:
          Decided to try to install PIL on my Mac (OS X.5).
          >
          OK, sounds good.

          I know nothing about installing programs on Linux,
          nothing about building C programs, nothing about
          installing libraries, nothing about "fink", nothing
          about anything. Please insert question marks after
          every sentence:
          >
          For the record, OS X isn't Linux--it's a variant of BSD Unix. Similar,
          but no identical, to Linux.
          >

          I saw a "BUILDME" with instructions "for lazy programmers".
          I did that. It seems that everything worked except a
          jpg library is missing.
          >
          OK.
          >

          I read that I need to install libjpeg. I read that on OS X
          this is "usually" done using fink. Great:

          (i) The idea of installing fink scares me, for no reason
          I could name. There's no way that's going to confuse the
          rest of Darwin, right?
          >
          You don't really need Fink just to install libjpeg. You do need the
          developer tools (Xcode) installed, otherwise you can't build any
          software at all.
          >
          Libjpeg can be downloaded from http://www.ijg.org/. Download it,
          untar/unzip it. Fire up terminal, cd to the libjpeg directory, and type
          these commands:
          >
          configure
          make
          sudo make install
          >
          That should get libjpeg built and installed.
          >

          (ii) When I look at the fink website I see a list of
          supported libraries, not including libjpeg.
          >
          So don't worry about Fink.
          >

          I hate messing with things that I don't understand at _all_...
          >
          Well, that's understandable, but this is your chance to learn something
          new.

          Thanks for any advice or comments.

          DU.
          --Kevin
          --
          David C. Ullrich

          Comment

          • Kevin Walzer

            #6
            Re: PIL (etc etc etc) on OS X

            First, it occurred to me that I've got wxPython installed
            and it includes jpeg support. I don't suppose that means that
            wxPython has already put a libjpeg somewhere and I just
            need to tell PIL where it is?
            I doubt it. You're probably better off building libjpeg yourself.
            >
            >
            Presumably jibjpeg needs to be unzipped into its own
            directory, or configure/make etc wouldn't be able to
            figure out what I want to make. Presumably that happens
            automatically when I unzip it.
            Yes.
            >
            Then after I do the configure/make/sudo make install will
            libjpeg automatically be in some standard place? If not,
            what's a good choice of standard place to put it, and
            how do I put it there? (If I start here then it will
            unzip to there, and then after I make it there it will
            be installed in this third place, which is where I want
            it.)
            I think, by default, that it installs in /usr/local/lib. You can run
            configure --help in the libjpeg directory and it will give you a rundown
            of the various options, including where to install libjepg if you want a
            different place.

            >
            Thanks. Sorry to be so dumb - yes, it's perfectly reasonable
            for eff to assume that people using PIL are programmers.
            With a "new thing" in, say, Python I'd just try something
            and then figure out what to try next to make it work - I
            don't want to take that approach here lest I re-make
            part of Darwin or something. Once many years ago I
            learned a new thing: Attempting to run a sufficiently
            invalid DOS exe could cause physical damage to a hard
            drive... that wasn't the only thing I learned that day.
            /usr/local is a good place to install stuff in a way that won't disrupt
            your system. OS X/Darwin puts its system stuff in /usr/bin, /usr/lib,
            and so on.

            --Kevin

            --
            Kevin Walzer
            Code by Kevin

            Comment

            • David C. Ullrich

              #7
              Re: PIL (etc etc etc) on OS X

              Thanks for the hand-holding.

              DU.

              In article <48948BBA.90507 06@codebykevin. com>,
              Kevin Walzer <kw@codebykevin .comwrote:
              [more about installing libjpeg...]
              --
              David C. Ullrich

              Comment

              • David C. Ullrich

                #8
                Re: PIL (etc etc etc) on OS X

                Just as well that the message sent earlier today
                seems to have been lost...

                Ok. Read your instructions on libjpeg. Read some
                of the install.doc. ./configure, fine. make, fine.
                "make test", fine. So I said "sudo make install"
                and this happened:

                0-1d-4f-fc-28-d:jpeg-6b dullric$ sudo make install
                Password:
                /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
                /usr/bin/install -c djpeg /usr/local/bin/djpeg
                /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
                /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
                /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

                Surely that means it was installed in /usr/local/bin, right?

                So I start over with PIL. It says I should "python setup.py build_ext
                -i".
                So I do:

                0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python setup.py build_ext -i
                running build_ext
                --- using frameworks at /System/Library/Frameworks
                --------------------------------------------------------------------
                PIL 1.1.6 BUILD SUMMARY
                --------------------------------------------------------------------
                version 1.1.6
                platform darwin 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
                [GCC 4.0.1 (Apple Inc. build 5465)]
                --------------------------------------------------------------------
                --- TKINTER support ok
                *** JPEG support not available
                --- 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.

                So I look in setup.py and I find this:

                # Library pointers.
                #
                # Use None to look for the libraries in well-known library locations.
                # Use a string to specify a single directory, for both the library and
                # the include files. Use a tuple to specify separate directories:
                # (libpath, includepath). Examples:
                #
                # JPEG_ROOT = "/home/libraries/jpeg-6b"
                # TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
                #
                # If you have "lib" and "include" directories under a common parent,
                # you can use the "libinclude " helper:
                #
                # TIFF_ROOT = libinclude("/opt/tiff")

                FREETYPE_ROOT = None
                JPEG_ROOT = None
                #JPEG_ROOT = "/usr/local/bin"

                I try it both ways, with JPEG_ROOT=None and
                JPEG_ROOT = "/usr/local/bin" - same result
                both times, "JPEG support not available".

                Any thoughts?

                Later in setup.py it says

                if find_library_fi le(self, "jpeg"):
                feature.jpeg = "jpeg"
                elif sys.platform == "win32" and find_library_fi le(self,
                "libjpeg"):
                feature.jpeg = "libjpeg" # alternative name

                Not knowing exactly what "find_library_f ile" does I
                couldn't say, but it almost sounds like it's looking
                for a file named "jpeg". The summary from the jpeg
                install looks like it didn't install any such file.
                Maybe "jpeg" should be the name of one of those files
                that did get installed?

                This _is_ fun. Eech.

                DU.

                --
                David C. Ullrich

                Comment

                • Kevin Walzer

                  #9
                  Re: PIL (etc etc etc) on OS X

                  David C. Ullrich wrote:
                  Just as well that the message sent earlier today
                  seems to have been lost...
                  >
                  Ok. Read your instructions on libjpeg. Read some
                  of the install.doc. ./configure, fine. make, fine.
                  "make test", fine. So I said "sudo make install"
                  and this happened:
                  >
                  0-1d-4f-fc-28-d:jpeg-6b dullric$ sudo make install
                  Password:
                  /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
                  /usr/bin/install -c djpeg /usr/local/bin/djpeg
                  /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
                  /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
                  /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
                  >
                  Surely that means it was installed in /usr/local/bin, right?
                  >
                  So I start over with PIL. It says I should "python setup.py build_ext
                  -i".
                  So I do:
                  >
                  0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python setup.py build_ext -i
                  running build_ext
                  --- using frameworks at /System/Library/Frameworks
                  --------------------------------------------------------------------
                  PIL 1.1.6 BUILD SUMMARY
                  --------------------------------------------------------------------
                  version 1.1.6
                  platform darwin 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
                  [GCC 4.0.1 (Apple Inc. build 5465)]
                  --------------------------------------------------------------------
                  --- TKINTER support ok
                  *** JPEG support not available
                  --- 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.
                  >
                  So I look in setup.py and I find this:
                  >
                  # Library pointers.
                  #
                  # Use None to look for the libraries in well-known library locations.
                  # Use a string to specify a single directory, for both the library and
                  # the include files. Use a tuple to specify separate directories:
                  # (libpath, includepath). Examples:
                  #
                  # JPEG_ROOT = "/home/libraries/jpeg-6b"
                  # TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
                  #
                  # If you have "lib" and "include" directories under a common parent,
                  # you can use the "libinclude " helper:
                  #
                  # TIFF_ROOT = libinclude("/opt/tiff")
                  >
                  FREETYPE_ROOT = None
                  JPEG_ROOT = None
                  #JPEG_ROOT = "/usr/local/bin"
                  >
                  How about "/usr/local/lib" ? It's looking for a dylib (library file),
                  not an executable (bin).


                  --
                  Kevin Walzer
                  Code by Kevin

                  Comment

                  • Irmen de Jong

                    #10
                    Re: PIL (etc etc etc) on OS X


                    David C. Ullrich wrote:
                    Just as well that the message sent earlier today
                    seems to have been lost...
                    >
                    Ok. Read your instructions on libjpeg. Read some
                    of the install.doc. ./configure, fine. make, fine.
                    "make test", fine. So I said "sudo make install"
                    and this happened:
                    >
                    0-1d-4f-fc-28-d:jpeg-6b dullric$ sudo make install
                    Password:
                    [...]

                    I had to do the following to build and install it in a way such that PIL would recognise
                    it. But it does now, without changing anything in PIL's setup files.

                    $ cd jpeg-6b/
                    $ ln -s `which glibtool` libtool
                    $ export MACOSX_DEPLOYME NT_TARGET=10.4
                    $ ./configure --enable-shared --enable-static --host=powerpc
                    $ make
                    $ sudo make install


                    (note that I have a PPC mac so the host parameter may not be correct for your system)
                    --irmen

                    Comment

                    • David C. Ullrich

                      #11
                      Re: PIL (etc etc etc) on OS X

                      In article <48976BDD.30207 09@codebykevin. com>,
                      Kevin Walzer <kw@codebykevin .comwrote:
                      David C. Ullrich wrote:
                      Just as well that the message sent earlier today
                      seems to have been lost...

                      Ok. Read your instructions on libjpeg. Read some
                      of the install.doc. ./configure, fine. make, fine.
                      "make test", fine. So I said "sudo make install"
                      and this happened:

                      0-1d-4f-fc-28-d:jpeg-6b dullric$ sudo make install
                      Password:
                      /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
                      /usr/bin/install -c djpeg /usr/local/bin/djpeg
                      /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
                      /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
                      /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

                      Surely that means it was installed in /usr/local/bin, right?

                      So I start over with PIL. It says I should "python setup.py build_ext
                      -i".
                      So I do:

                      0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python setup.py build_ext -i
                      running build_ext
                      --- using frameworks at /System/Library/Frameworks
                      --------------------------------------------------------------------
                      PIL 1.1.6 BUILD SUMMARY
                      --------------------------------------------------------------------
                      version 1.1.6
                      platform darwin 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
                      [GCC 4.0.1 (Apple Inc. build 5465)]
                      --------------------------------------------------------------------
                      --- TKINTER support ok
                      *** JPEG support not available
                      --- 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.

                      So I look in setup.py and I find this:

                      # Library pointers.
                      #
                      # Use None to look for the libraries in well-known library locations.
                      # Use a string to specify a single directory, for both the library and
                      # the include files. Use a tuple to specify separate directories:
                      # (libpath, includepath). Examples:
                      #
                      # JPEG_ROOT = "/home/libraries/jpeg-6b"
                      # TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
                      #
                      # If you have "lib" and "include" directories under a common parent,
                      # you can use the "libinclude " helper:
                      #
                      # TIFF_ROOT = libinclude("/opt/tiff")

                      FREETYPE_ROOT = None
                      JPEG_ROOT = None
                      #JPEG_ROOT = "/usr/local/bin"
                      >
                      How about "/usr/local/lib" ? It's looking for a dylib (library file),
                      not an executable (bin).
                      Thanks. I'd already tried that (a much longer post detaining
                      everything I'd tried got lost - you saw the abbreviated
                      version, sorry).

                      I noticed there are no new files in /usr/local/lib.
                      So I looked at the libjpeg install.doc and saw this:


                      * If you want to build libjpeg as a shared library, say
                      ./configure --enable-shared
                      To get both shared and static libraries, say
                      ./configure --enable-shared --enable-static
                      Note that these switches invoke GNU libtool to take care of
                      system-dependent
                      shared library building methods. If things don't work this way, please
                      try
                      running configure without either switch; that should build a static
                      library
                      without using libtool.

                      (What I want here is a static library?) When I add either or
                      both of those switches it says

                      0-1d-4f-fc-28-d:jpeg-6b dullric$ make
                      ../libtool --mode=compile gcc -O2 -I. -c ./jcapimin.c
                      make: ./libtool: Command not found
                      make: *** [jcapimin.lo] Error 127

                      --
                      David C. Ullrich

                      Comment

                      • David C. Ullrich

                        #12
                        Re: PIL (etc etc etc) on OS X

                        In article <489797fc$0$498 16$e4fe514c@new s.xs4all.nl>,
                        Irmen de Jong <irmen.NOSPAM@x s4all.nlwrote:
                        David C. Ullrich wrote:
                        Just as well that the message sent earlier today
                        seems to have been lost...

                        Ok. Read your instructions on libjpeg. Read some
                        of the install.doc. ./configure, fine. make, fine.
                        "make test", fine. So I said "sudo make install"
                        and this happened:

                        0-1d-4f-fc-28-d:jpeg-6b dullric$ sudo make install
                        Password:
                        [...]
                        >
                        I had to do the following to build and install it in a way such that PIL
                        would recognise
                        it. But it does now, without changing anything in PIL's setup files.
                        >
                        $ cd jpeg-6b/
                        $ ln -s `which glibtool` libtool
                        $ export MACOSX_DEPLOYME NT_TARGET=10.4
                        $ ./configure --enable-shared --enable-static --host=powerpc
                        $ make
                        $ sudo make install
                        Thanks - that gets me closer:

                        I'd already found out about the --enable-* switches, but
                        when I tried them it complained it couldn't find ./libtool.
                        I _guessed_ host should be intel
                        I changed the 10.4 to 10.5 and did this:

                        $ ln -s `which glibtool` libtool
                        $ export MACOSX_DEPLOYME NT_TARGET=10.4
                        $ ./configure --enable-shared --enable-static --host=intel
                        $ make
                        $ sudo make install

                        That fixed the complaints about no ./libtool, great.

                        Then I went back to PIL. The setup.py reported that everything
                        was great, including JPEG.

                        And then selftest.py said it couldn't find a jpeg decoder...

                        0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python selftest.py
                        *************** *************** *************** *************** *****
                        Failure in example: _info(Image.ope n("Images/lena.jpg"))
                        from line #24 of selftest.testim age
                        Exception raised:
                        Traceback (most recent call last):
                        File "./doctest.py", line 499, in _run_examples_i nner
                        exec compile(source, "<string>", "single") in globs
                        File "<string>", line 1, in <module>
                        File "./selftest.py", line 22, in _info
                        im.load()
                        File "PIL/ImageFile.py", line 180, in load
                        d = Image._getdecod er(self.mode, d, a, self.decodercon fig)
                        File "PIL/Image.py", line 375, in _getdecoder
                        raise IOError("decode r %s not available" % decoder_name)
                        IOError: decoder jpeg not available
                        1 items had failures:
                        1 of 57 in selftest.testim age
                        ***Test Failed*** 1 failures.
                        *** 1 tests of 57 failed.

                        >
                        (note that I have a PPC mac so the host parameter may not be correct for your
                        system)
                        --irmen
                        --
                        David C. Ullrich

                        Comment

                        • David C. Ullrich

                          #13
                          Re: PIL (etc etc etc) on OS X

                          In article <dullrich-BD9EEE.11035302 082008@text.gig anews.com>,
                          "David C. Ullrich" <dullrich@spryn et.comwrote:
                          In article <489388af$0$498 80$e4fe514c@new s.xs4all.nl>,
                          Irmen de Jong <irmen.NOSPAM@x s4all.nlwrote:
                          >
                          David C. Ullrich wrote:
                          Decided to try to install PIL on my Mac (OS X.5).
                          >
                          I know nothing about installing programs on Linux,
                          nothing about building C programs, nothing about
                          installing libraries, nothing about "fink", nothing
                          about anything. Please insert question marks after
                          every sentence:
                          Not needed.
                          Just download a precompiled installation package from
                          http://pythonmac.org/packages/
                          >
                          Lovely - thanks.
                          When I try this it says "Need System Python 2.5".
                          Even though I'm running 2.5.1.

                          I'm running the python that came with OSX. This stuff
                          isn't going to work with that, it needs the Python
                          from that site as well?
                          I just installed PIL 1.1.6 two days ago, using the Python 2.5 package from
                          this site :)
                          (OS X 10.4.11 on a PPC mac mini)

                          --irmen
                          --
                          David C. Ullrich

                          Comment

                          • Fredrik Lundh

                            #14
                            Re: PIL (etc etc etc) on OS X

                            David C. Ullrich wrote:
                            Thanks. Sorry to be so dumb - yes, it's perfectly reasonable
                            for eff to assume that people using PIL are programmers.
                            well, my only assumption is that people building PIL from basic building
                            blocks must have some understanding of how that's done on their
                            specific platform (and I don't have that knowledge myself for all
                            platforms). And OS X can be something of a mess; search for "OS X" in
                            the image-sig archives for a lot more on this.

                            </F>

                            Comment

                            Working...