New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install on macOS Big Sur (zlib missing) #4816
Comments
Please could you try some suggestions from https://github.com/python-pillow/Pillow/issues/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 |
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 clang by default is using:
And indeed, I believe Catalina had already got rid of |
I've created PR #4842 to try and address this. |
If you are interested in testing my PR, you can do so with |
Yup, that fixes it for me |
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 DetailsCollecting 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 $ 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.) |
#4974 is part of 8.0.0, so the SDK path should now be included as well. |
The same error, when trying to install latest Pillow on macOS 11.0.1 |
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? |
worked for me |
Run |
I reinstalled zlib via brew, and then ran the exports that suggested which solved the problem for me:
|
this is what worked for me, I wanted to highlight it in case others have the same problem (none of the other recommendations did). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@krishita30j This doesn't look like a Pillow issue:
I suggest you take this up with Oppia directly, and they already have an issue for this: |
Me too! |
I installed wheel and pillow just with pip3 install pillow and pip3 install wheel |
If you're still having this problem, please create a new issue with more detail. |
This is best and worked for me in BIgsur 11.4 |
This is what worked on M1 Silicon Mac for python 2.7.18: LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" CFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" pip install Pillow
|
Pillow needs
followed by exporting proper paths for building it as:
This worked for me on MacOS Monterey v12.3 |
What did you do?
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:
When I try to install with easy_install, I get similar errors:
What did you expect to happen?
Pillow will properly install.
What actually happened?
Error message shown above
What are your OS, Python and Pillow versions?
What else have you tried?
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.
The text was updated successfully, but these errors were encountered: