"ValueError: --enable-jpeg requested but jpeg not found" occurred after the upgrade to Pillow=3.0.0 #1457

Closed
kakovskyi opened this Issue Oct 2, 2015 · 9 comments

Projects

None yet

6 participants

@kakovskyi

OS: Ubuntu 12.04
Interpreter: Python 2.7.3
Previously used Pillow version: 2.9.0
New Pillow version: 3.0.0

Today our CI has been loaded Pillow=3.0.0 at the first time (because pillow>=2.7.0 was specified in requirements.txt).
Here is the build log (unrelated lines are omitted):

02-Oct-2015 07:21:45    Collecting pillow>=2.7.0 (from requirements.txt)
02-Oct-2015 07:21:46      Downloading Pillow-3.0.0.tar.gz (9.6MB)
02-Oct-2015 07:21:54    Building wheels for collected packages: pillow
02-Oct-2015 07:22:03      Running setup.py bdist_wheel for pillow
02-Oct-2015 07:22:04      Complete output from command /tmp/awesome-app/venv/bin/python -c "import setuptools;__file__='/tmp/pip-build-eZ6qWe/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpdDunJVpip-wheel-:
02-Oct-2015 07:22:04      running bdist_wheel
02-Oct-2015 07:22:04      running build
02-Oct-2015 07:22:04      running build_py
02-Oct-2015 07:22:04      creating build
02-Oct-2015 07:22:04      creating build/lib.linux-x86_64-2.7
02-Oct-2015 07:22:04      creating build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImagePalette.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/SunImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/_binary.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/__init__.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/WalImageFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageSequence.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageWin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/MspImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/OleFileIO.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageMath.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImagePath.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageTk.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageMorph.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageTransform.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/GdImageFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/MicImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PaletteFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/TarIO.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/BdfFontFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageColor.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageFilter.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/CurImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageCms.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageChops.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/Image.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageEnhance.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/_util.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ContainerIO.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/FliImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageQt.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageOps.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/GimpGradientFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageDraw2.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageStat.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/TiffTags.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageGrab.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PyAccess.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageMode.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageDraw.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/JpegPresets.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/GifImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/FontFile.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PSDraw.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/features.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ExifTags.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageShow.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/PngImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      copying PIL/ImageFont.py -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      running egg_info
02-Oct-2015 07:22:04      writing Pillow.egg-info/PKG-INFO
02-Oct-2015 07:22:04      writing top-level names to Pillow.egg-info/top_level.txt
02-Oct-2015 07:22:04      writing dependency_links to Pillow.egg-info/dependency_links.txt
02-Oct-2015 07:22:04      warning: manifest_maker: standard file '-c' not found
02-Oct-2015 07:22:04      
02-Oct-2015 07:22:04      reading manifest file 'Pillow.egg-info/SOURCES.txt'
02-Oct-2015 07:22:04      reading manifest template 'MANIFEST.in'
02-Oct-2015 07:22:04      writing manifest file 'Pillow.egg-info/SOURCES.txt'
02-Oct-2015 07:22:04      copying PIL/OleFileIO-README.md -> build/lib.linux-x86_64-2.7/PIL
02-Oct-2015 07:22:04      running build_ext
02-Oct-2015 07:22:04      Traceback (most recent call last):
02-Oct-2015 07:22:04        File "<string>", line 1, in <module>
02-Oct-2015 07:22:04        File "/tmp/pip-build-eZ6qWe/pillow/setup.py", line 767, in <module>
02-Oct-2015 07:22:04          zip_safe=not debug_build(),
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
02-Oct-2015 07:22:04          dist.run_commands()
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
02-Oct-2015 07:22:04          self.run_command(cmd)
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
02-Oct-2015 07:22:04          cmd_obj.run()
02-Oct-2015 07:22:04        File "/tmp/awesome-app/venv/local/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 175, in run
02-Oct-2015 07:22:04          self.run_command('build')
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
02-Oct-2015 07:22:04          self.distribution.run_command(command)
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
02-Oct-2015 07:22:04          cmd_obj.run()
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
02-Oct-2015 07:22:04          self.run_command(cmd_name)
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
02-Oct-2015 07:22:04          self.distribution.run_command(command)
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
02-Oct-2015 07:22:04          cmd_obj.run()
02-Oct-2015 07:22:04        File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run
02-Oct-2015 07:22:04          self.build_extensions()
02-Oct-2015 07:22:04        File "/tmp/pip-build-eZ6qWe/pillow/setup.py", line 515, in build_extensions
02-Oct-2015 07:22:04          % (f, f))
02-Oct-2015 07:22:04      ValueError: --enable-jpeg requested but jpeg not found, aborting.
02-Oct-2015 07:22:04      
02-Oct-2015 07:22:04      ----------------------------------------
02-Oct-2015 07:22:04      Failed building wheel for pillow

After that we forced to use Pillow==2.9.0 - works perfectly.

@aclark4life
Member

I've seen this. That means you should install libjpeg-dev or disable jpeg then try again. I think we may have done this on purpose to avoid (silently) broken builds.

@wiredfool
Member

Are you trying to build without libjpeg?

There was a change in this release cycle that promoted libjpeg and libz to required dependencies unless explicitly disabled.

@hugovk
Member
hugovk commented Oct 2, 2015

@viachk Something that's changed in Pillow 3.0.0 is that the previously optional libjpeg and zlib are now required by default. See #1412.

Do you have libjpeg installed? See https://pillow.readthedocs.org/en/3.0.0/installation.html#linux-installation for instructions.

If not, and if you don't want libjpeg, use the --disable-jpeg build flag. More: https://pillow.readthedocs.org/en/3.0.0/installation.html#build-options

@aclark4life
Member

Hah! 3 for one today.

@wiredfool
Member

Yep, guess you won that race.

@kakovskyi

Many thanks, folks.
Especially for the link: #1412

@kakovskyi kakovskyi closed this Oct 2, 2015
@spitty spitty added a commit to spitty/docker-reviewboard that referenced this issue Oct 31, 2015
@spitty spitty Update for Reviewboard 2.5
Reviewboard requires Pillow. Pillow requires libjpeg since 3.0.0

See also: python-pillow/Pillow#1457 (comment)
279ad77
@spitty spitty added a commit to spitty/docker-reviewboard that referenced this issue Oct 31, 2015
@spitty spitty Update for Reviewboard 2.5
Reviewboard requires Pillow. Pillow requires libjpeg since 3.0.0

See also: python-pillow/Pillow#1457 (comment)
2d1c9b1
@spitty spitty referenced this issue in ikatson/docker-reviewboard Nov 1, 2015
Merged

Update for Reviewboard 2.5 #4

@thefourtheye

On Ubuntu 15.10, I had to do

sudo apt-get install libjpeg-dev zlib1g-dev
@krt16s krt16s pushed a commit to krt16s/fdroidserver that referenced this issue May 17, 2016
@Zillode Zillode Added libjpeg and zlib dependency in README 1ba346a
@krt16s krt16s pushed a commit to krt16s/fdroidserver that referenced this issue May 17, 2016
@mvdan mvdan Merge branch 'fix-jpeg' into 'master'
Added libjpeg and zlib dependency in README

It seems these dependencies are also required.

See python-pillow/Pillow#1457

See merge request !118
1e6069e
@blaggacao

Strange enough on alpine linux it fails with zlib:
See where it puts the files:
https://pkgs.alpinelinux.org/contents?branch=v3.3&name=zlib-dev&arch=armhf&repo=main
Invoked like this in requirements.txt:

Pillow==2.7.0 --global-option="build_ext" --global-option="--enable-zlib" --global-option="--enable-jpeg" --global-option="--enable-tiff" --global-option="--enable-freetype"
@wiredfool
Member

@blaggacao Alpine uses a different set of directories for libraries as mentioned in #1763.

@LeoHeo LeoHeo added a commit to LeoHeo/fastube-aws that referenced this issue Jun 29, 2016
@LeoHeo LeoHeo refactor Pillow version change
pip install Pillow in AWS CodeDeploy

Value Error

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

python-pillow/Pillow#1457

reference upgrade Pillow
30edaf7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment