Search code examples
pythonlinuxpython-imaging-library

Fail during installation of Pillow (Python module) in Linux


I'm trying to install Pillow (Python module) using pip, but it throws this error:

ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

So as the error says, I tried:

pip install pillow --global-option="--disable-jpeg"

But it fails with:

error: option --disable-jpeg not recognized

Any hints how to deal with it?


Solution

  • Thank you @mfitzp. In my case (CentOS) these libs are not available in the yum repo, but actually the solution was even easier. What I did:

    sudo yum install python-devel
    sudo yum install zlib-devel
    sudo yum install libjpeg-turbo-devel
    

    And now pillow's installation finishes successfully.