I tried installing a pillow with the pipenv, I have a python version 3.9.1 installed and tried to install a pillow with that but facing this issue mentioned below.
I wanted to use pillow with django.
Pillow installation causing error continuously, the error is mentioned below.
Collecting Pillow==7.2.0
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: /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-wheel-rk7rd8w9
cwd: /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/
Complete output (172 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-arm64-3.8
creating build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_version.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/features.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_util.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_binary.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/Image.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/__main__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.14.6-arm64-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'
warning: build_py: byte-compiling is disabled, skipping.
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/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 864, in <module>
setup(
File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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: /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-record-sbw6wf02/install-record.txt --single-version-externally-managed --compile --install-headers /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/include/site/python3.8/Pillow
cwd: /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/
Complete output (174 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-arm64-3.8
creating build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_version.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/features.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_util.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/_binary.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/Image.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/__main__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.14.6-arm64-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'
warning: build_py: byte-compiling is disabled, skipping.
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/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 864, in <module>
setup(
File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 561, in run
self.run_command('build')
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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: /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/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/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-record-sbw6wf02/install-record.txt --single-version-externally-managed --compile --install-headers /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/include/site/python3.8/Pillow Check the logs for full command output.
First off, any particular reason to use Pillow 7.2.0 on not 8.x? Python 3.9 support was officially added to Pillow in 8.0.0:
https://pillow.readthedocs.io/en/stable/installation.html#python-support
I think there's still some work going on in the packaging world to support Apple silicon, and so it's attempting to install and build from source.
Please could you first try after updating pip and wheel?
It's also possible to download one of the wheels from https://pypi.org/project/Pillow/8.0.1/#files and change one of the tags in the filename, and pip install that, but I can't find the details for that now. It was something like replace x86_64 with universal2.
Or to build from source, you need to install some dependencies first:
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
Thank you for reaching back. I have also tried with pillow version 8.0.1 but the same issue is going on, unable to install Pillow.
I have same question
I try execute
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
on the Macbook Pro 13 M1 Silicon have the same question
on the Macbook Air Intel Core is Successfully
@jia611 Please can you try this? (Instructions based on https://github.com/scipy/scipy/issues/13102#issuecomment-733988544)
$ python3 -m pip install packaging
$ python3 -c"from packaging import tags; print('\n'.join([str(t) for t in tags.sys_tags()]))" |head -5
cp38-cp38-macosx_11_0_x86_64
mv Pillow-8.0.1-cp38-cp38-macosx_10_10_x86_64.whl Pillow-8.0.1-cp38-cp38-macosx_11_0_x86_64.whl
python3 -m pip install Pillow-8.0.1-cp38-cp38-macosx_11_0_x86_64.whl
Or https://github.com/scipy/scipy/issues/13102#issuecomment-744473479:
Fwiw, I managed to install
scipyon Big Sur (Intel Macbook) by using the compatibility mode, in which macOS will report being version 10.16 instead of 11.0:export SYSTEM_VERSION_COMPAT=1 > sw_vers -productVersion 10.16
python3 -m pip install Pillow-8.0.1-cp38-cp38-macosx_11_0_x86_64.whl is error
ERROR: Pillow-8.0.1-cp38-cp38-macosx_11_0_x86_64.whl is not a supported wheel on this platform.
@jia611 What output do you get for this?
python3 -c"from packaging import tags; print('\n'.join([str(t) for t in tags.sys_tags()]))" |head -5
@jia611 What output do you get for this?
python3 -c"from packaging import tags; print('\n'.join([str(t) for t in tags.sys_tags()]))" |head -5
cp38-cp38-macosx_11_0_arm64
cp38-cp38-macosx_11_0_universal2
cp38-abi3-macosx_11_0_arm64
cp38-abi3-macosx_11_0_universal2
cp38-none-macosx_11_0_arm64
Then please try renaming it to match one of those, for example Pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
Perhaps an obvious answer to be had. If I download and change to Pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
where do I put the file to actually run sudo python3 -m pip install Pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl?
In your current directory.
Or you could change the command to use a relative path.
Or, you could specify an absolute path, e.g. sudo python3 -m pip install /Users/geoffsharris/Downloads/Pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
Then please try renaming it to match one of those, for example
Pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
thank you
Successfully installed Pillow-8.0.1
Good to hear, thanks for testing!
Now the question is what changes do we need to make for the next release to be pip installable on M1 from PyPI? Are changes needed at multibuild? I think pip+packaging (https://github.com/pypa/packaging/pull/319) and wheel (https://github.com/pypa/wheel/pull/390) are ready.
The installation worked on my Macbook Pro 13 M1 but when I try to use it still has problems. I am trying to run the https://github.com/tensorflow/hub/blob/master/examples/colab/object_detection.ipynb notebook.
I get the following error:
dlopen(python3.8/site-packages/PIL/_imaging.cpython-38-darwin.so, 2): no suitable image found. Did find:
tensorflow_venv/lib/python3.8/site-packages/PIL/_imaging.cpython-38-darwin.so: mach-o, but wrong architecture
@goleador how did you install Pillow?
@radarhere I have the same problem as @goleador
when i run python3 in arm arch锛宲ython3 main.py 锛宔rror log is:
from PIL import Image, ImageDraw, ImageFont, ImageFilter
File "/Users/tx/Work/dykt_back/venv/lib/python3.9/site-packages/PIL/Image.py", line 94, in <module>
from . import _imaging as core
ImportError: dlopen(/Users/tx/Work/dykt_back/venv/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/tx/Work/dykt_back/venv/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/tx/Work/dykt_back/venv/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so: mach-o, but wrong architecture
and when i run arch -x86_64 python3 main.py , the service is successful.
I installed using the directions on this thread. Basically, renaming the .whl file as described above. @radarhere
In case this is helpful to anyone, here's a wheel I put together on my M1 -
Pillow-8.0.1-cp39-cp39-macosx_11_0_arm64.whl.zip
@radarhere Tried to install your wheel on my m1.
Got :
ERROR: Pillow-8.0.1-cp39-cp39-macosx_11_0_arm64.whl is not a supported wheel on this platform. .
:(
@y4nng-dev were you using Python 3.9, or a different Python version? Could you provide the full command that you used to try and install the wheel?
@radarhere I'm using Python 3.8.2 and here is the command I used :
python3 -m pip install /Users/username/Desktop/Pillow-8.0.1-cp39-cp39-macosx_11_0_arm64.whl
Thank you
@y4nng-dev ah, yes - the wheel I attached was for Python 3.9. Here is a wheel for Python 3.8 -
Pillow-8.0.1-cp38-cp38-macosx_11_0_arm64.whl.zip
thank you
Now the question is what changes do we need to make for the next release to be pip installable on M1 from PyPI? Are changes needed at multibuild? I think pip+packaging (pypa/packaging#319) and wheel (pypa/wheel#390) are ready.
For one thing, https://github.com/actions/virtual-environments/issues/1814 is in preview.
I've created https://github.com/matthew-brett/multibuild/pull/379 as a start in multibuild at least.