6

I am getting a decoder jpeg not available. I libjpeg installed using brew but when I install pillow, is get *** JPEG support not available

I had this working and all of a sudden it stopped working. I have unlinked and linked libjpeg again like it was suggested in few other SO answers. I have also uninstalled pillow and libjpeg and then installed it again, no joy.

Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66

2 Answers2

7

Have you installed libjpeg-dev?

sudo apt-get install libjpeg-dev

Edit: realized you're probably on OSX. Have you tried the following step from the accepted answer from this question?

  • Before installing PIL but after installing libjpeg, change the “JPEG_ROOT = None” line in my setup.py file to “JPEG_ROOT = libinclude(“/usr/local”)” (or wherever libjpeg is installed)

Have you tried the most common solution to this problem?

$ pip uninstall pillow`
$ brew install libjpeg`
$ pip install pillow`
Community
  • 1
  • 1
Jamie Counsell
  • 7,730
  • 6
  • 46
  • 81
  • I am not using PIL, installing Pillow and did the steps you mentioned already. – Chirdeep Tomar Dec 23 '14 at 21:58
  • I've updated my answer for pillow. Are you using a Python virtual environment such as virtualenv? – Jamie Counsell Dec 23 '14 at 22:02
  • Yeah, sorry forgot to mention that. Weirdly this was working, just stopped after 2 months.Yeah did that with Pillow only. – Chirdeep Tomar Dec 23 '14 at 22:04
  • It may be either a permissions issue or a path issue. Have you moved anything around? Is everything you need on your path? Maybe reset the permissions of your VM and the libjpeg files. – Jamie Counsell Dec 25 '14 at 18:17
  • No I haven't changed anything, I installed libjpeg using brew, thought it might be symlinks issues so unlinked and linked back again. Completely re-installed virtual env and still no good. – Chirdeep Tomar Dec 26 '14 at 12:32
  • DO remember to use the `--no-cache-dir` option when reinstalling `Pillow`. – Gesias Sep 06 '18 at 17:55
2

I installed libjpeg form http://ethan.tira-thompson.com/Mac_OS_X_Ports.html and it works now. Probably brew didn't create symlinks where its being expected.

Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66