Can’t install Pillow ver 6.0.0 at Python 3.7.9 on mac M1 (python installed by arch -x86_64)

First, my venv setting is under arch -x86_64(brew86, pyenv86, python 3.7.9_x86)

but i couldn’t install Pillow version 6.0.0 with this virtualenv.

here is all console messages I’ve got..

Building wheels for collected packages: Pillow
  Building wheel for Pillow (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/yanako/pjt/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py'"'"'; __file__='"'"'/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-wheel-thf_rrb0
       cwd: /private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/
  Complete output (174 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-14.4-x86_64-3.7
  creating build/lib.macosx-14.4-x86_64-3.7/PIL
  copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-14.4-x86_64-3.7/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'
  no previously-included directories found matching 'docs/_static'
  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 '.landscape.yaml'
  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 'tox.ini'
  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 "/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py", line 792, in <module>
      zip_safe=not (debug_build() or PLATFORM_MINGW), )
    File "/Users/yanako/pjt/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/yanako/pjt/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py", line 606, 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/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py", line 804, 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, popbill, pycrypto, pycryptodome, pyexcel-xls, pyexcel-xlsx, XlsxWriter, pyexcel-xlsxw, pyodbc, qrcode, shellescape, uWSGI
    Running setup.py install for Pillow ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/yanako/pjt/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py'"'"'; __file__='"'"'/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-record-u0ju_7os/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yanako/pjt/venv/include/site/python3.7/Pillow
         cwd: /private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/
    Complete output (176 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-14.4-x86_64-3.7
    creating build/lib.macosx-14.4-x86_64-3.7/PIL
    copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-14.4-x86_64-3.7/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'
    no previously-included directories found matching 'docs/_static'
    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 '.landscape.yaml'
    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 'tox.ini'
    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 "/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py", line 792, in <module>
        zip_safe=not (debug_build() or PLATFORM_MINGW), )
      File "/Users/yanako/pjt/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/yanako/pjt/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/yanako/.pyenv/versions/3.7.9/lib/python3.7/distutils/command/build_ext.py", line 340, in run
        self.build_extensions()
      File "/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py", line 606, 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/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py", line 804, 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/yanako/pjt/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py'"'"'; __file__='"'"'/private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-install-mcdyaax1/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nq/cjn7n4ls1n94nqsn4ysr51zm0000gn/T/pip-record-u0ju_7os/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yanako/pjt/venv/include/site/python3.7/Pillow Check the logs for full command output.

I’ve tried to install all my requirements with “–no-binary :all:” flag..

with this, i installed pandas and some libraries.

and for this, I’ve tried to reinstall ‘zlib’ by brew

   brew install zlib
   brew install jpeg
   export LDFLAGS="-L/usr/local/opt/zlib/lib"
   export CPPFLAGS="-I/usr/local/opt/zlib/include"

New contributor

YanaKo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật