21

I tried these commands:

pip install libjpeg8-dev pip install libjpeg-dev pip install libjpeg-devel pip install libjpeg pip install libjpeg62 libjpeg62-dev 

but none of them works. What is the right command with pip?

3
  • If you want to manipulate images using python, use the "Python Imaging library". Commented Aug 15, 2012 at 12:19
  • 1
    PIL requires libjpeg for jpg-related stuff Commented Aug 15, 2012 at 12:24
  • Usually (at least on Linux and *BSD and OSX) it is the job of the package management system to deal with such things. Commented Aug 15, 2012 at 12:30

5 Answers 5

51

Use apt-get. As a side note, I was getting errors installing pillow and these commands helped me

sudo apt-get install libjpeg-dev sudo apt-get install zlib1g-dev sudo apt-get install libpng-dev 
Sign up to request clarification or add additional context in comments.

Comments

12

libjpeg is not a python module and pip won't ever be able to install it.

Use your Operating System's packaging system to install it. On Ubuntu and Debian that'd be apt, for example.

1 Comment

In the ideal case PIL should have option to download libjpeg and install together :)
3

I used homebrew to install that!

brew install libjpeg 

Hope that helps

Comments

1

Actually I use Heroku and the problem therefore is more complicated. Here is a solution.
EDIT: but attempts to use both hg- and git-based variants failed with various errors. Damn!

Comments

0

If you are running other weird OS like Red Hat you can also try: yum install libjpeg-devel zlib-devel

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.