_EDIT AFTER CLOSE_
If you're having compilation errors on Windows or Mac and you usually install from a binary -- Check to see if we've released a new version lately. It takes a day for all the binaries to get built and uploaded, and in the meantime, pip will try to grab the source, compile it and fail.
_end edit_
The world has progressed, and some things are just expected of an imaging library now, like jpeg and png support.
I propose that the default now be to require that libjpeg and zlib be found, unless they are explicitly disabled with the command line flags --disable-jpeg and --disable-zlib.
:+1:
A belated and enthusiastic :+1:
Unsure how to pass --disable-jpeg to pip. Tried
pip install --upgrade pillow --global-option="--disable-jpeg"
pip install --upgrade pillow --install-option="--disable-jpeg"
but both fail with
Complete output from command /tmp/foo/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-6rGUcw/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" --disable-jpeg install --record /tmp/pip-U18BC2-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/foo/include/site/python2.7/pillow:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --disable-jpeg not recognized
I suspect this is relevant, but unsure yet as to how:
http://stackoverflow.com/questions/677577/distutils-how-to-pass-a-user-defined-parameter-to-setup-py
Got it!!!
pip install --upgrade pillow --global-option="build_ext" --global-option="--disable-jpeg"
I know I've said in the past that it's not our place to be documenting pip's quirks.
As someone who is trying to get Pillow to work, I appreciate the documentation of pip's quirks. Also, I have no idea how this is supposed to work on Windows. Does this introduce a dependency on Ming, just to get JPG support?
I don't mind documenting pip's quirks. @pvcraven You would need Ming if you are compiling, but ideally you'd use a pre-built binary egg or wheel. In such cases, I think Pillow either includes image libraries or expects them to be in a specific location.
Compiling on windows is it's own special thing. There's an entire directory of stuff in Pillow/winbuild that will build pillow on some subset of our dependencies using the MS compilers.
If you're looking for 3.1, we'll have binaries soon. You're better off waiting. If you're looking to understand the build process, you can dig into that directory.
Ok, knowing binaries are coming is great news! I've got a library that depends on Pillow, and asking windows users to "Please install Visual C++" is a kill-joy.
Oh, this is really new. I see it killed automated AppVeyor builds that worked only yesterday.
Yeah, 3.1 was released this morning, and pip generally fails in unhelpful ways on Windows until binaries are available.
3.1 Binaries are up.
And to people googling and finding this thread -- If you're having compilation errors on Windows or Mac and you usually install from a binary -- Check to see if we've released a new version lately. It takes a day for all the binaries to get built and uploaded, and in the meantime, pip will try to grab the source, compile it and fail.
And to people googling and finding this thread, part 2: here's how to install a specific version.
If 3.1.0 is just out (no binaries ready) and 3.0.0 was the last release (has binaries), install the last one like:
pip install pillow==3.0.0
I spent almost a day figuring out what is wrong with pillow installation. It was working fine till yesterday and suddenly stopped working from today. Finally got it figured out, Few of my team mates upgraded python to 3.6 version which is now available for download. Since Pillow is not yet made compatible with 3.6 and is supporting only till 3.5.2 this error popped up.
Resolution is to check if Pillow supports your version of python. Once I reverted python back to 3.5.2 the installation worked like a charm and no errors encountered.
Hope this help resolve your issue.
Most helpful comment
Unsure how to pass --disable-jpeg to pip. Tried
but both fail with
I suspect this is relevant, but unsure yet as to how:
http://stackoverflow.com/questions/677577/distutils-how-to-pass-a-user-defined-parameter-to-setup-py
Got it!!!