I am trying to install Pillow (since it's required for matplotlib). I am running macOS Big Sur beta 3 (20A5323l), with Python 3.8.5 installed with homebrew. I also have numpy and zlib installed through homebrew.
When I try to install Pillow with pip, I get the following error:
➜ sudo -H python3 -m pip install --upgrade Pillow
Collecting Pillow
Using cached Pillow-7.2.0.tar.gz (39.1 MB)
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/[email protected]/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/pip-wheel-3hwcm3o0
cwd: /private/tmp/pip-install-5mo6rr9f/Pillow/
Complete output (170 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.0-x86_64-3.8
creating build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_version.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/__init__.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/features.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_util.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_binary.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/Image.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/__main__.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py", line 864, in <module>
setup(
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py", line 694, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py", line 918, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
ERROR: Failed building wheel for Pillow
Running setup.py clean for Pillow
Failed to build Pillow
Installing collected packages: Pillow
Running setup.py install for Pillow ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/[email protected]/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-i9qpkwl7/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/Pillow
cwd: /private/tmp/pip-install-5mo6rr9f/Pillow/
Complete output (172 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-11.0-x86_64-3.8
creating build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_version.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/__init__.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/features.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_util.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/_binary.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/Image.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/__main__.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-11.0-x86_64-3.8/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py", line 864, in <module>
setup(
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py", line 694, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py", line 918, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/[email protected]/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-5mo6rr9f/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-i9qpkwl7/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/Pillow Check the logs for full command output.
When I try to install with easy_install, I get similar errors:
```➜ sudo -H python3 -m easy_install Pillow
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for Pillow
Reading https://pypi.org/simple/Pillow/
Downloading https://files.pythonhosted.org/packages/3e/02/b09732ca4b14405ff159c470a612979acfc6e8645dc32f83ea0129709f7a/Pillow-7.2.0.tar.gz#sha256=97f9e7953a77d5a70f49b9a48da7776dc51e9b738151b22dacf101641594a626
Best match: Pillow 7.2.0
Processing Pillow-7.2.0.tar.gz
Writing /tmp/easy_install-u80im5vs/Pillow-7.2.0/setup.cfg
Running Pillow-7.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-u80im5vs/Pillow-7.2.0/egg-dist-tmp-dpy_ylgh
warning: no files found matching '.c'
warning: no files found matching '.h'
warning: no files found matching '.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
no previously-included directories found matching '.ci'
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "/tmp/easy_install-u80im5vs/Pillow-7.2.0/setup.py", line 864, in
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 174, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 160, in call_command
self.run_command(cmdname)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/tmp/easy_install-u80im5vs/Pillow-7.2.0/setup.py", line 694, in build_extensions
__main__.RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-u80im5vs/Pillow-7.2.0/setup.py", line 918, in
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/site-packages/easy_install.py", line 5, in
main()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 2307, in main
setup(
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 425, in run
self.easy_install(spec, not self.no_deps)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 686, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 712, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 897, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1167, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1151, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.8/site-packages/setuptools/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-u80im5vs/Pillow-7.2.0/setup.py", line 918, in
setuptools.sandbox.UnpickleableException: RequiredDependencyException('\n\nThe headers or library files could not be found for zlib,\na required dependency when compiling Pillow from source.\n\nPlease see the install instructions at:\n https://pillow.readthedocs.io/en/latest/installation.html\n\n')
```
Pillow will properly install.
Error message shown above
I followed every solution given in #4242 including downgrading pip, upgrading pip, specifying different Pillow versions, and using easy_install. I have installed, uninstalled, and reinstalled zlib from homebrew.
Please could you try some suggestions from https://github.com/python-pillow/Pillow/issues/3438?
Please could you try some suggestions from #3438?
Hmm, none of those solutions seem to apply/do anything. I have CommandLine Tools installed, but I don't have the Packages directory so I can't run sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers.... I already have openssl and [email protected] installed through homebrew, and adding stuff to my LDFLAGS, CPATH, CPPFLAGS, and PKG_CONFIG_PATH doesn't change anything.
I´m also having the same problem
I'm having the same problem today
First, It's a unreleased OS, not publicly available, so the support level is "It might work" until it's out. At that point I expect that we'll have a developer on Big Sur to debug it.
Second, I suspect that the problem is that it's looking for wheels for macosx_11.0, not macos_10.whatevers, so none of the binaries are matching, even though it's likely binary compatible with the catalina compatible wheels. This is probably a pip/packaging issue.
Third, macos has switched library locations and build incantations quite a few times. It's going to take a while for the packaging community to work out what's actually changed here.
The issue here is compiler.include_dirs doesn't have the correct set of paths in it, and thus we aren't finding it.
clang by default is using:
clang -cc1 version 12.0.0 (clang-1200.0.22.21) default target x86_64-apple-darwin20.0.0
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks (framework directory)
And indeed, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/zlib.h exists.
I believe Catalina had already got rid of /usr/include, so I don't know how/if this worked there?
I've created PR #4842 to try and address this.
If you are interested in testing my PR, you can do so with sudo -H python3 -m pip install https://github.com/radarhere/Pillow/archive/zlib.zip
If you are interested in testing my PR, you can do so with
sudo -H python3 -m pip install https://github.com/radarhere/Pillow/archive/zlib.zip
Yup, that fixes it for me
If you are interested in testing my PR, you can do so with
sudo -H python3 -m pip install https://github.com/radarhere/Pillow/archive/zlib.zip
Also fixes https://github.com/python-pillow/Pillow/issues/3438 for me on Mojave (10.14).
First reproduce with master (in a new terminal with no extra env vars set from #3438, and I didn't use sudo in either case):
$ python3 -m pip install https://github.com/python-pillow/Pillow/archive/master.zip
Details
Collecting https://github.com/python-pillow/Pillow/archive/master.zip
Downloading https://github.com/python-pillow/Pillow/archive/master.zip
- 39.8 MB 8.8 MB/s
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py'"'"'; __file__='"'"'/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-wheel-uwr95p6v
cwd: /private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/
Complete output (174 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_version.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/features.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_util.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_binary.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/Image.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/__main__.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
running egg_info
creating src/Pillow.egg-info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py", line 862, in <module>
setup(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py", line 707, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py", line 915, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
ERROR: Failed building wheel for Pillow
Running setup.py clean for Pillow
Failed to build Pillow
DEPRECATION: Could not build wheels for Pillow which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: Pillow
Running setup.py install for Pillow ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py'"'"'; __file__='"'"'/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-record-ggdsbc1w/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/Pillow
cwd: /private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/
Complete output (174 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_version.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/features.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_util.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/_binary.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/Image.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/__main__.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.8/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py", line 862, in <module>
setup(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py", line 707, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py", line 915, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py'"'"'; __file__='"'"'/private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-req-build-ro7fx529/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-record-ggdsbc1w/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/Pillow Check the logs for full command output.
And success with the PR branch (again no sudo):
$ python3 -m pip install https://github.com/radarhere/Pillow/archive/zlib.zip
Collecting https://github.com/radarhere/Pillow/archive/zlib.zip
Downloading https://github.com/radarhere/Pillow/archive/zlib.zip
\ 39.8 MB 9.6 MB/s
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... done
Created wheel for Pillow: filename=Pillow-8.0.0.dev0-cp38-cp38-macosx_10_9_x86_64.whl size=548947 sha256=fc7ebcff69ad7f5c1329767e67f97d0139118bfc5381febaa82a975ae08c742b
Stored in directory: /private/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/pip-ephem-wheel-cache-jauoc3w8/wheels/fa/50/18/9f0a2c242cbfb802797cd4339e072560eed18dcdbe97904b36
Successfully built Pillow
Installing collected packages: Pillow
Successfully installed Pillow-8.0.0.dev0
It should really be possible to install it against the system Python as well as Homebrew, and that requires the macOS SDK path to be on the set of include paths to search. (I think it also requires something to be fixed to find the library stub in the SDK, but that's in distutils/CPython-land, see https://bugs.python.org/issue41116.)
The same error, when trying to install latest Pillow on macOS 11.0.1
When trying to use solution above
ERROR: HTTP error 404 while getting https://github.com/radarhere/Pillow/archive/zlib.zip
Don't worry about trying my zlib branch - my PR has been merged and released as part of Pillow 8.0.
Do you happen to know where zlib.h is located on your machine? Do you expect it to be there because of Xcode, homebrew or something else?
CFLAGS='-I/usr/local/opt/zlib/include -L/usr/local/opt/zlib/lib' pip install Pillow==<version>
worked for me
Run export SYSTEM_VERSION_COMPAT=1 before all other scripts
They say Big Sur is both 10.16 and 11.0. So it's kind of a backward compatibility.
I reinstalled zlib via brew, and then ran the exports that suggested which solved the problem for me:
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"
Run
export SYSTEM_VERSION_COMPAT=1before all other scripts
They say Big Sur is both 10.16 and 11.0. So it's kind of a backward compatibility.
this is what worked for me, I wanted to highlight it in case others have the same problem (none of the other recommendations did).
Most helpful comment
Run
export SYSTEM_VERSION_COMPAT=1before all other scriptsThey say Big Sur is both 10.16 and 11.0. So it's kind of a backward compatibility.