Pillow: "pip install pillow" failing with python 3.8 and pillow 6.2.1

Created on 21 Oct 2019  Β·  25Comments  Β·  Source: python-pillow/Pillow

I noticed that support for 3.8 has been added to pillow 6.2.1, but when I try to pip install it, it's trying to build from source and errors because no zlib.

Am I just being too impatient and binary wheels are forthcoming?

Here's my python runtime info:

Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32

Installation Windows

Most helpful comment

@sthasam2 downgrade your pip to 19.3 and type :

pip install Pillow==6.2.1 --no-cache-dir

it will work.

my pip was 19.3.1 and Pillow never worked in windows.

All 25 comments

I am having the same issue on 64-bit
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32

Collecting Pillow
  Downloading https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz (37.7MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 37.7MB 1.7MB/s
Installing collected packages: Pillow
    Running setup.py install for Pillow ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\administrator.crc\\AppData\\Local\\Temp\\pip-install-cgb_7ejd\\Pillow\\setup.py'"'"'; __file__='"'"'C:\\Users\\administrator.crc\\AppData\\Local\\Temp\\pip-install-cgb_7ejd\\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 'C:\Users\administrator.crc\AppData\Local\Temp\pip-record-ifk7e9h2\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\administrator.crc\AppData\Local\Temp\pip-install-cgb_7ejd\Pillow\

@CRCGlobal for some reason yours is still trying to pull 6.2.0. Try clearing your pip cache and see if that fixes it to pull 6.2.1

I just realized that and I retried with the no-cache-dir option and have a new error

Collecting Pillow
  Downloading https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz (37.7MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 37.7MB 1.7MB/s
Installing collected packages: Pillow
    Running setup.py install for Pillow ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\administrator.crc\\AppData\\Local\\Temp\\pip-install-cgb_7ejd\\Pillow\\setup.py'"'"'; __file__='"'"'C:\\Users\\administrator.crc\\AppData\\Local\\Temp\\pip-install-cgb_7ejd\\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 'C:\Users\administrator.crc\AppData\Local\Temp\pip-record-ifk7e9h2\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\administrator.crc\AppData\Local\Temp\pip-install-cgb_7ejd\Pillow\

Everything's uploaded, 28 files at https://pypi.org/project/Pillow/6.2.1/#files:

Filename, size | File type | Python version | Upload date | Hashes
-- | -- | -- | -- | --
Wheel | cp27 | about 2 hours ago | View
Wheel | cp27 | about 2 hours ago | View
Wheel | cp27 | about 2 hours ago | View
Wheel | cp27 | about 2 hours ago | View
Wheel | cp27 | about 2 hours ago | View
Wheel | cp27 | about 2 hours ago | View
Wheel | cp27 | about 2 hours ago | View
Wheel | cp35 | about 2 hours ago | View
Wheel | cp35 | about 2 hours ago | View
Wheel | cp35 | about 2 hours ago | View
Wheel | cp35 | about 2 hours ago | View
Wheel | cp35 | about 2 hours ago | View
Wheel | cp36 | about 2 hours ago | View
Wheel | cp36 | about 2 hours ago | View
Wheel | cp36 | about 2 hours ago | View
Wheel | cp36 | about 2 hours ago | View
Wheel | cp36 | about 2 hours ago | View
Wheel | cp37 | about 2 hours ago | View
Wheel | cp37 | about 2 hours ago | View
Wheel | cp37 | about 2 hours ago | View
Wheel | cp37 | about 2 hours ago | View
Wheel | cp37 | about 2 hours ago | View
Wheel | cp38 | about 2 hours ago | View
Wheel | cp38 | about 2 hours ago | View
Wheel | cp38 | about 2 hours ago | View
Wheel | pp272 | about 2 hours ago | View
Wheel | pp372 | about 2 hours ago | View
Source | None | about 2 hours ago | View

28 files locally:

βŒ‚217% [hugo:/private/tmp/Pillow] 6.2.x+* Β± l dist
total 191216
drwxr-xr-x  30 hugo  wheel   960B 21 Oct 20:34 .
drwxr-xr-x  44 hugo  wheel   1.4K 21 Oct 20:06 ..
-rw-r--r--   1 hugo  wheel   3.7M 21 Oct 11:11 Pillow-6.2.1-cp27-cp27m-macosx_10_6_intel.whl
-rw-r--r--   1 hugo  wheel   1.9M 21 Oct 11:14 Pillow-6.2.1-cp27-cp27m-manylinux1_i686.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:08 Pillow-6.2.1-cp27-cp27m-manylinux1_x86_64.whl
-rwxr-xr-x@  1 hugo  wheel   1.6M 21 Oct 07:06 Pillow-6.2.1-cp27-cp27m-win32.whl
-rwxr-xr-x@  1 hugo  wheel   1.8M 21 Oct 07:05 Pillow-6.2.1-cp27-cp27m-win_amd64.whl
-rw-r--r--   1 hugo  wheel   1.9M 21 Oct 11:09 Pillow-6.2.1-cp27-cp27mu-manylinux1_i686.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:07 Pillow-6.2.1-cp27-cp27mu-manylinux1_x86_64.whl
-rw-r--r--   1 hugo  wheel   3.7M 21 Oct 11:15 Pillow-6.2.1-cp35-cp35m-macosx_10_6_intel.whl
-rw-r--r--   1 hugo  wheel   1.9M 21 Oct 11:15 Pillow-6.2.1-cp35-cp35m-manylinux1_i686.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:15 Pillow-6.2.1-cp35-cp35m-manylinux1_x86_64.whl
-rwxr-xr-x@  1 hugo  wheel   1.6M 21 Oct 07:05 Pillow-6.2.1-cp35-cp35m-win32.whl
-rwxr-xr-x@  1 hugo  wheel   1.9M 21 Oct 07:04 Pillow-6.2.1-cp35-cp35m-win_amd64.whl
-rw-r--r--   1 hugo  wheel   3.7M 21 Oct 12:00 Pillow-6.2.1-cp36-cp36m-macosx_10_6_intel.whl
-rw-r--r--   1 hugo  wheel   1.9M 21 Oct 11:22 Pillow-6.2.1-cp36-cp36m-manylinux1_i686.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:20 Pillow-6.2.1-cp36-cp36m-manylinux1_x86_64.whl
-rwxr-xr-x@  1 hugo  wheel   1.6M 21 Oct 07:03 Pillow-6.2.1-cp36-cp36m-win32.whl
-rwxr-xr-x@  1 hugo  wheel   1.9M 21 Oct 07:02 Pillow-6.2.1-cp36-cp36m-win_amd64.whl
-rw-r--r--   1 hugo  wheel   3.7M 21 Oct 12:10 Pillow-6.2.1-cp37-cp37m-macosx_10_6_intel.whl
-rw-r--r--   1 hugo  wheel   1.9M 21 Oct 11:28 Pillow-6.2.1-cp37-cp37m-manylinux1_i686.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:22 Pillow-6.2.1-cp37-cp37m-manylinux1_x86_64.whl
-rwxr-xr-x@  1 hugo  wheel   1.7M 21 Oct 07:04 Pillow-6.2.1-cp37-cp37m-win32.whl
-rwxr-xr-x@  1 hugo  wheel   1.9M 21 Oct 07:03 Pillow-6.2.1-cp37-cp37m-win_amd64.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:39 Pillow-6.2.1-cp38-cp38-macosx_10_9_x86_64.whl
-rw-r--r--   1 hugo  wheel   1.9M 21 Oct 11:29 Pillow-6.2.1-cp38-cp38-manylinux1_i686.whl
-rw-r--r--   1 hugo  wheel   2.0M 21 Oct 11:29 Pillow-6.2.1-cp38-cp38-manylinux1_x86_64.whl
-rwxr-xr-x@  1 hugo  wheel   1.6M 21 Oct 07:06 Pillow-6.2.1-pp272-pypy_41-win32.whl
-rwxr-xr-x@  1 hugo  wheel   1.6M 21 Oct 07:07 Pillow-6.2.1-pp372-pp372-win32.whl
-rw-r--r--   1 hugo  wheel    36M 21 Oct 10:44 Pillow-6.2.1.tar.gz
βŒ‚143% [hugo:/private/tmp/Pillow] 6.2.x+* Β± l dist/Pillow-6.2.1* | wc -l
      28

@remdragon Please can you also paste the full pip install output?

Here's my full pip output:

>pip install pillow --no-cache-dir
Collecting pillow
  Downloading https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz (37.7MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 37.7MB 3.3MB/s
Installing collected packages: pillow
    Running setup.py install for pillow ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\roy\\AppData\\Local\\Temp\\pip-install-lmfy2vgl\\pillow\\setup.py'"'"'; __file__='"'"'C:\\Users\\roy\\AppData\\Local\\Temp\\pip-install-lmfy2vgl\\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 'C:\Users\roy\AppData\Local\Temp\pip-record-sj5st7e8\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\roy\AppData\Local\Temp\pip-install-lmfy2vgl\pillow\
    Complete output (174 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.8
    creating build\lib.win32-3.8\PIL
    copying src\PIL\BdfFontFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\BlpImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\BmpImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\BufrStubImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ContainerIO.py -> build\lib.win32-3.8\PIL
    copying src\PIL\CurImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\DcxImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\DdsImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\EpsImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ExifTags.py -> build\lib.win32-3.8\PIL
    copying src\PIL\features.py -> build\lib.win32-3.8\PIL
    copying src\PIL\FitsStubImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\FliImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\FontFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\FpxImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\FtexImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\GbrImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\GdImageFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\GifImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\GimpGradientFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\GimpPaletteFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\GribStubImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\Hdf5StubImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\IcnsImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\IcoImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\Image.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageChops.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageCms.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageColor.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageDraw.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageDraw2.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageEnhance.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageFilter.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageFont.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageGrab.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageMath.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageMode.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageMorph.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageOps.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImagePalette.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImagePath.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageQt.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageSequence.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageShow.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageStat.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageTk.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageTransform.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImageWin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\ImtImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\IptcImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\Jpeg2KImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\JpegImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\JpegPresets.py -> build\lib.win32-3.8\PIL
    copying src\PIL\McIdasImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\MicImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\MpegImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\MpoImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\MspImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PaletteFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PalmImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PcdImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PcfFontFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PcxImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PdfImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PdfParser.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PixarImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PngImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PpmImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PsdImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PSDraw.py -> build\lib.win32-3.8\PIL
    copying src\PIL\PyAccess.py -> build\lib.win32-3.8\PIL
    copying src\PIL\SgiImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\SpiderImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\SunImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\TarIO.py -> build\lib.win32-3.8\PIL
    copying src\PIL\TgaImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\TiffImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\TiffTags.py -> build\lib.win32-3.8\PIL
    copying src\PIL\WalImageFile.py -> build\lib.win32-3.8\PIL
    copying src\PIL\WebPImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\WmfImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\XbmImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\XpmImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\XVThumbImagePlugin.py -> build\lib.win32-3.8\PIL
    copying src\PIL\_binary.py -> build\lib.win32-3.8\PIL
    copying src\PIL\_tkinter_finder.py -> build\lib.win32-3.8\PIL
    copying src\PIL\_util.py -> build\lib.win32-3.8\PIL
    copying src\PIL\_version.py -> build\lib.win32-3.8\PIL
    copying src\PIL\__init__.py -> build\lib.win32-3.8\PIL
    copying src\PIL\__main__.py -> build\lib.win32-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 '.codecov.yml'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'azure-pipelines.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 '.azure-pipelines'
    no previously-included directories found matching '.travis'
    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 "C:\Users\roy\AppData\Local\Temp\pip-install-lmfy2vgl\pillow\setup.py", line 852, in <module>
        setup(
      File "c:\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "C:\Python38\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Python38\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python38\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Python38\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Python38\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Python38\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "C:\Users\roy\AppData\Local\Temp\pip-install-lmfy2vgl\pillow\setup.py", line 687, 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 "C:\Users\roy\AppData\Local\Temp\pip-install-lmfy2vgl\pillow\setup.py", line 903, 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: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\roy\\AppData\\Local\\Temp\\pip-install-lmfy2vgl\\pillow\\setup.py'"'"'; __file__='"'"'C:\\Users\\roy\\AppData\\Local\\Temp\\pip-install-lmfy2vgl\\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 'C:\Users\roy\AppData\Local\Temp\pip-record-sj5st7e8\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

What pip versions do you have? Does upgrading help?

@cgohlke Any ideas? I've confirmed the Windows wheels on PyPI match those from the zip.

And it's installing cleanly on GHA for 2.7, 3.5, 3.6, 3.7 (no there 3.8 yet) with:

      ubuntu-18.04,
      ubuntu-16.04,
      macOS-10.14,
      windows-2019,
      windows-2016,

https://github.com/hugovk/test/commit/1b1363482640bac8c02d0722412219de2313ad08/checks?check_suite_id=274738566

These are all for 3.8 though, as is https://github.com/python-pillow/Pillow/issues/4159.

The latest:

pip 19.3.1 from c:python38\lib\site-packages\pip (python 3.8)

@cgohlke Aha, there's no cp38 Windows wheel:

βŒ‚76% [hugo:/private/tmp/Pillow] 6.2.x+* Β± l dist/*win*
-rwxr-xr-x@ 1 hugo  wheel   1.6M 21 Oct 07:06 dist/Pillow-6.2.1-cp27-cp27m-win32.whl
-rwxr-xr-x@ 1 hugo  wheel   1.8M 21 Oct 07:05 dist/Pillow-6.2.1-cp27-cp27m-win_amd64.whl
-rwxr-xr-x@ 1 hugo  wheel   1.6M 21 Oct 07:05 dist/Pillow-6.2.1-cp35-cp35m-win32.whl
-rwxr-xr-x@ 1 hugo  wheel   1.9M 21 Oct 07:04 dist/Pillow-6.2.1-cp35-cp35m-win_amd64.whl
-rwxr-xr-x@ 1 hugo  wheel   1.6M 21 Oct 07:03 dist/Pillow-6.2.1-cp36-cp36m-win32.whl
-rwxr-xr-x@ 1 hugo  wheel   1.9M 21 Oct 07:02 dist/Pillow-6.2.1-cp36-cp36m-win_amd64.whl
-rwxr-xr-x@ 1 hugo  wheel   1.7M 21 Oct 07:04 dist/Pillow-6.2.1-cp37-cp37m-win32.whl
-rwxr-xr-x@ 1 hugo  wheel   1.9M 21 Oct 07:03 dist/Pillow-6.2.1-cp37-cp37m-win_amd64.whl
-rwxr-xr-x@ 1 hugo  wheel   1.6M 21 Oct 07:06 dist/Pillow-6.2.1-pp272-pypy_41-win32.whl
-rwxr-xr-x@ 1 hugo  wheel   1.6M 21 Oct 07:07 dist/Pillow-6.2.1-pp372-pp372-win32.whl

Sorry. Forgot to update the zip command. Here you go.

Thank you, uploaded to PyPI!

confirmed pip install now works for windows 32-bit

confirmed , works on windows 64-bit
thank you

So, I'm still having issues. As a noob I wish to know how to solve this issue. Any help from the veteran python community?

@sthasam2 Please open a new issue with details.

@sthasam2 downgrade your pip to 19.3 and type :

pip install Pillow==6.2.1 --no-cache-dir

it will work.

my pip was 19.3.1 and Pillow never worked in windows.

Try this:-

python -m pip install pip
python -m pip install Pillow

pillow not installing
It asked me to install zlib which is already installed yet still giving me problem

Try this:-

python -m pip install pip
python -m pip install Pillow

i have pip 19.0.3 and it's works, thanks

pillow version that installed is 7.0.0

I Had Python 3.8.1 with Pip 19.0.3.
and even :

..Py3.8.1\Scripts/python.exe -m pip install Pillow --no-cache-dir

did not work for me

same Error

The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.

After updating Pip to 20.0.2 It WORKED!!!

Microsoft Windows [Version 10.0.18362.720]
(c) 2019 Microsoft Corporation. All rights reserved.
(tkinter learn) D:\Dev Prj Py\tkinter learn>pip install Pillow
Collecting Pillow
  Using cached https://files.pythonhosted.org/packages/c7/04/c91bb0e495c1e8a09633ecb061fab32e276ace7cefcef5d12334cdd14cd2/Pillow-7.1.1.tar.gz
Installing collected packages: Pillow
  Running setup.py install for Pillow ... error
    Complete output from command "C:\Users\User\venv\tkinter learn\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip
-install-mof163vs\\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 C:\Users\User\AppData\Local\Temp\pip-record-nmatks0f\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\User\venv\tkinter l
earn\include\site\python3.8\Pillow":
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\PIL
    copying src\PIL\BdfFontFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\BlpImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\BmpImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\BufrStubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ContainerIO.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\CurImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\DcxImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\DdsImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\EpsImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ExifTags.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\features.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FitsStubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FliImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FontFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FpxImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FtexImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GbrImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GdImageFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GifImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GimpGradientFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GimpPaletteFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GribStubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\Hdf5StubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\IcnsImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\IcoImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\Image.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageChops.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageCms.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageColor.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageDraw.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageDraw2.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageEnhance.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageFilter.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageFont.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageGrab.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageMath.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageMode.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageMorph.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageOps.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImagePalette.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImagePath.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageQt.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageSequence.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageShow.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageStat.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageTk.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageTransform.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageWin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImtImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\IptcImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\Jpeg2KImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\JpegImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\JpegPresets.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\McIdasImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MicImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MpegImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MpoImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MspImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PaletteFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PalmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PcdImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PcfFontFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PcxImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PdfImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PdfParser.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PixarImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PngImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PpmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PsdImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PSDraw.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PyAccess.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\SgiImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\SpiderImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\SunImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TarIO.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TgaImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TiffImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TiffTags.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\WalImageFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\WebPImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\WmfImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\XbmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\XpmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\XVThumbImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_binary.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_tkinter_finder.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_util.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_version.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\__init__.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\__main__.py -> build\lib.win-amd64-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 'azure-pipelines.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 '.azure-pipelines'
    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 "C:\Users\User\AppData\Local\Temp\pip-install-mof163vs\Pillow\setup.py", line 860, in <module>
        setup(
      File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
      File "D:\Program Files\Python38\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\install.py", line 61, in run
      File "D:\Program Files\Python38\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "D:\Program Files\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "D:\Program Files\Python38\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "D:\Program Files\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "D:\Program Files\Python38\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "C:\Users\User\AppData\Local\Temp\pip-install-mof163vs\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 "C:\Users\User\AppData\Local\Temp\pip-install-mof163vs\Pillow\setup.py", line 914, 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



    ----------------------------------------
Command ""C:\Users\User\venv\tkinter learn\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-mof163vs\\Pillo
w\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\A
ppData\Local\Temp\pip-record-nmatks0f\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\User\venv\tkinter learn\include\site\python
3.8\Pillow"" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-mof163vs\Pillow\

(tkinter learn) D:\Dev Prj Py\tkinter learn>easy_install Pillow
Searching for Pillow
Reading https://pypi.org/simple/Pillow/
Downloading https://files.pythonhosted.org/packages/c7/04/c91bb0e495c1e8a09633ecb061fab32e276ace7cefcef5d12334cdd14cd2/Pillow-7.1.1.tar.gz#sha256=0f89ddc77cf421b8cd34ae852309
501458942bf370831b4a9b406156b599a14e
Best match: Pillow 7.1.1
Processing Pillow-7.1.1.tar.gz
Writing C:\Users\User\AppData\Local\Temp\easy_install-4hqri7s8\Pillow-7.1.1\setup.cfg
Running Pillow-7.1.1\setup.py -q bdist_egg --dist-dir C:\Users\User\AppData\Local\Temp\easy_install-4hqri7s8\Pillow-7.1.1\egg-dist-tmp-audnu5di
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 'azure-pipelines.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 '.azure-pipelines'
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 "C:\Users\User\AppData\Local\Temp\easy_install-4hqri7s8\Pillow-7.1.1\setup.py", line 860, in <module>
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
  File "D:\Program Files\Python38\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "D:\Program Files\Python38\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\bdist_egg.py", line 172, in run
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\bdist_egg.py", line 158, in call_command
  File "D:\Program Files\Python38\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\install_lib.py", line 11, in run
  File "D:\Program Files\Python38\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "D:\Program Files\Python38\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "D:\Program Files\Python38\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\Users\User\AppData\Local\Temp\easy_install-4hqri7s8\Pillow-7.1.1\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 "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 154, in save_modules
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 195, in setup_context
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 250, in run_setup
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 45, in _execfile
  File "C:\Users\User\AppData\Local\Temp\easy_install-4hqri7s8\Pillow-7.1.1\setup.py", line 914, in <module>
__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 "C:\Users\User\venv\tkinter learn\Scripts\easy_install-script.py", line 11, in <module>
    load_entry_point('setuptools==40.8.0', 'console_scripts', 'easy_install')()
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 2312, in main
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
  File "D:\Program Files\Python38\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "D:\Program Files\Python38\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 418, in run
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 679, in easy_install
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 705, in install_item
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 890, in install_eggs
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 1158, in build_and_install
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 1144, in run_setup
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 253, in run_setup
  File "D:\Program Files\Python38\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 195, in setup_context
  File "D:\Program Files\Python38\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 166, in save_modules
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 141, in resume
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\_vendor\six.py", line 685, in reraise
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 154, in save_modules
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 195, in setup_context
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 250, in run_setup
  File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 45, in _execfile
  File "C:\Users\User\AppData\Local\Temp\easy_install-4hqri7s8\Pillow-7.1.1\setup.py", line 914, in <module>
setuptools.sandbox.UnpickleableException: RequiredDependencyException('\n\nThe headers or library files could not be found for zlib,\na required dependency when compiling Pil
low from source.\n\nPlease see the install instructions at:\n   https://pillow.readthedocs.io/en/latest/installation.html\n\n')



























































































































































































































                                                                          low from source.\n\nPlease
 see the install instructions at:\n   https://pillow.readthedocs.io/en/latest/installation.html\n\n'
)

(tkinter learn) D:\Dev Prj Py\tkinter learn>pip install Download\\Pillow.whl
Requirement 'Download\\\\Pillow.whl' looks like a filename, but the file does not exist
Pillow.whl is not a valid wheel filename.

(tkinter learn) D:\Dev Prj Py\tkinter learn>pip --version
pip 19.0.3 from c:\users\user\venv\tkinter learn\lib\site-packages\pip-19.0.3-py3.8.egg\pip (python
3.8)

(tkinter learn) D:\Dev Prj Py\tkinter learn>
(tkinter learn) D:\Dev Prj Py\tkinter learn>pip install Pillow==6.2.1 --no-cache-dir
Collecting Pillow==6.2.1
  Downloading https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz (37.7MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 37.7MB 11.4MB/s
Installing collected packages: Pillow
  Running setup.py install for Pillow ... error
    Complete output from command "C:\Users\User\venv\tkinter learn\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ioqviin3\\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 C:\Users\User\AppData\Local\Temp\pip-record-9whwu648\install-re
cord.txt --single-version-externally-managed --compile --install-headers "C:\Users\User\venv\tkinter learn\include\site\python3.8\Pillow":
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\PIL
    copying src\PIL\BdfFontFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\BlpImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\BmpImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\BufrStubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ContainerIO.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\CurImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\DcxImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\DdsImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\EpsImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ExifTags.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\features.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FitsStubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FliImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FontFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FpxImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\FtexImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GbrImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GdImageFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GifImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GimpGradientFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GimpPaletteFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\GribStubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\Hdf5StubImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\IcnsImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\IcoImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\Image.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageChops.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageCms.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageColor.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageDraw.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageDraw2.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageEnhance.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageFilter.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageFont.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageGrab.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageMath.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageMode.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageMorph.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageOps.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImagePalette.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImagePath.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageQt.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageSequence.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageShow.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageStat.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageTk.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageTransform.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImageWin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\ImtImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\IptcImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\Jpeg2KImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\JpegImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\JpegPresets.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\McIdasImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MicImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MpegImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MpoImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\MspImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PaletteFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PalmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PcdImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PcfFontFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PcxImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PdfImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PdfParser.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PixarImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PngImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PpmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PsdImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PSDraw.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\PyAccess.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\SgiImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\SpiderImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\SunImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TarIO.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TgaImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TiffImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\TiffTags.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\WalImageFile.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\WebPImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\WmfImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\XbmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\XpmImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\XVThumbImagePlugin.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_binary.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_tkinter_finder.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_util.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\_version.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\__init__.py -> build\lib.win-amd64-3.8\PIL
    copying src\PIL\__main__.py -> build\lib.win-amd64-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 '.codecov.yml'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'azure-pipelines.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 '.azure-pipelines'
    no previously-included directories found matching '.travis'
    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 "C:\Users\User\AppData\Local\Temp\pip-install-ioqviin3\Pillow\setup.py", line 852, in <module>
        setup(
      File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
      File "D:\Program Files\Python38\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\User\venv\tkinter learn\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\install.py", line 61, in run
      File "D:\Program Files\Python38\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "D:\Program Files\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "D:\Program Files\Python38\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "D:\Program Files\Python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Program Files\Python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "D:\Program Files\Python38\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "C:\Users\User\AppData\Local\Temp\pip-install-ioqviin3\Pillow\setup.py", line 687, 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 "C:\Users\User\AppData\Local\Temp\pip-install-ioqviin3\Pillow\setup.py", line 903, 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



    ----------------------------------------
Command ""C:\Users\User\venv\tkinter learn\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ioqviin3\\Pillow\\setup.py';f=getattr(tokenize, 'op
en', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-record-9whwu648\install-record.txt --single-versio
n-externally-managed --compile --install-headers "C:\Users\User\venv\tkinter learn\include\site\python3.8\Pillow"" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-ioqviin3\Pillow\

(tkinter learn) D:\Dev Prj Py\tkinter learn>



Not Working
(tkinter learn) D:\Dev Prj Py\tkinter learn>pip --version
pip 19.0.3 from c:\users\user\venv\tkinter learn\lib\site-packages\pip-19.0.3-py3.8.egg\pip (python 3.8)

(tkinter learn) D:\Dev Prj Py\tkinter learn>python --version
Python 3.8.1

(tkinter learn) D:\Dev Prj Py\tkinter learn>

@banidom Please continue this in the existing issue: https://github.com/python-pillow/Pillow/issues/4530.

Hi,

Thkx.

Regards,

Bani Dom

Chief Operating Officer

EZDOM Technology Sdn Bhd

34-1, Jalan Anggerik Aranda, BH31/BH

Kota Kemuning, 40460, Shah Alam, Selangor

M: +60 102569368

P: +603 5131 7811

F: +603 5131 7911

β€œWE MAKE YOU BETTER”

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

From: Hugo van Kemenade [mailto:[email protected]]
Sent: 08 April 2020 01:28
To: python-pillow/Pillow Pillow@noreply.github.com
Cc: Bani Dom banidom@ezdom.com.my; Mention mention@noreply.github.com
Subject: Re: [python-pillow/Pillow] "pip install pillow" failing with python 3.8 and pillow 6.2.1 (#4158)

@banidom https://github.com/banidom Please continue this in the existing issue: #4530 https://github.com/python-pillow/Pillow/issues/4530 .

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/python-pillow/Pillow/issues/4158#issuecomment-610516388 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ4X3JOMXOPF4LXLGH624Y3RLNPCVANCNFSM4JDEGVWA . https://github.com/notifications/beacon/AJ4X3JJHQTZ2DLPONVJX7SDRLNPCVA5CNFSM4JDEGVWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOERR33JA.gif

What pip versions do you have? Does upgrading help?

For pillow==5.1.0
Pip 20.2.2 and Python version 3.8 on windows, it shows the same error.

@gokulnathck you need at least Pillow 6.2.1 for Python 3.8, see https://pillow.readthedocs.io/en/stable/installation.html#notes

python -m pip install -U pip
python -m pip install -U pillow

If there's a problem with Pillow 6.2.1 or newer with Python 3.8, please open a new, detailed issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boskicthebrain picture boskicthebrain  Β·  4Comments

Larivact picture Larivact  Β·  4Comments

readyready15728 picture readyready15728  Β·  4Comments

maxhumber picture maxhumber  Β·  3Comments

anonymous530 picture anonymous530  Β·  3Comments