0

I had PIL installed on osx using pip, but since getting the error that jpeg decoder is not available, I uninstalled PIL so that I can first install the jpeg libraries, and then reinstall PIL. However, both the following give me errors:

    sudo pip install libjpeg

..Could not find any downloads that satisfy the requirement libjpeg

    sudo pip install libjpeg-dev

Could not find any downloads that satisfy the requirement libjpeg-dev

Any ideas how to install the jpeg lib? Thanks. -TM

The_Cthulhu_Kid
  • 1,839
  • 1
  • 31
  • 42
user818190
  • 579
  • 2
  • 11
  • 21
  • I pressume you've tried all the standard `apt-get update` stuff before running this? – will Jul 16 '13 at 12:19
  • not sure what apt-get is, but see my comments below to the answer. I have gotten so far with this. – user818190 Jul 17 '13 at 09:23
  • apt-get is a way to install things on many *nix systems. makes this kind of thing really easy. Don't know if it's available for mac though. – will Jul 18 '13 at 09:45

1 Answers1

1

I don't have a mac, but a quick google search yielded these instructions:

$ curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz
$ tar zxvf jpegsrc.v8c.tar.gz
$ cd jpeg-8c/
$ ./configure
$ make
$ sudo make install

at this page.

If that doesn't work, then this answer to the same question worked for someone, and they got it from this blog comment.

Community
  • 1
  • 1
will
  • 10,260
  • 6
  • 46
  • 69
  • I have just downloaded the jpegsrc v9 file from the url above. I'd now like to know how to install it using pip, and also if I need to first uninstall PIL, install this jpeg library, and then reinstall PIL. – user818190 Jul 17 '13 at 08:43
  • @user818190 `libjpeg` isn't a python library, you don't install it via pip/easy_install. You install it as a library for the whole computer, and then in then install pil. If it still can't find it, then do what it says in [this](http://stackoverflow.com/a/7528988/432913) answer. – will Jul 17 '13 at 08:49
  • Ok, so I downloaded the jpegsrc v9 library to my Desktop, installed it as you describe above, and then reinstalled PIL using pip. I got a confirmation that PIL was successfully installed with JPEG support. However, when I use scrapy to crawl a page, I get the same old error: decoder jpeg not available. – user818190 Jul 17 '13 at 09:22
  • Well i don't know anything about scrapy, i've never used it sorry. you could try what's mentioned here: http://effbot.org/zone/pil-decoder-jpeg-not-available.htm – will Jul 17 '13 at 13:42