Failure to build on Mac missing zlib header
aray-openai opened this issue · 1 comments
aray-openai commented
The same installation command that works for pillow
fails for pillow-simd
, which is surprising to me
What did you do?
Try to install pillow: works
pip uninstall -y pillow
pip install -U --force-reinstall pillow
Try to install pillow-simd: fails
pip uninstall -y pillow
pip install -U --force-reinstall pillow-simd
What did you expect to happen?
Both installations work
What actually happened?
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/2f/g5fwh_n57jl77kkpfb4jvm440000gn/T/pip-install-pf0cql2q/pillow-simd/setup.py", line 900, in <module>
zip_safe=not (debug_build() or PLATFORM_MINGW),
File "/Users/aray/.pyenv/versions/3.7.7/envs/z/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/aray/.pyenv/versions/3.7.7/envs/z/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/aray/.pyenv/versions/3.7.7/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/2f/g5fwh_n57jl77kkpfb4jvm440000gn/T/pip-install-pf0cql2q/pillow-simd/setup.py", line 687, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
What are your OS, Python and Pillow versions?
- OS: Mac OS X 10.14.2
- Python: 3.7.7 (built w/ pyenv & pyenv-virtualenv)
- Pillow: 7.0.0, and 7.0.0.post3 for pillow-simd
homm commented
The same installation command that works for pillow fails for pillow-simd
This is because Pillow provides binary packages, while Pillow-SIMD not. You need to install all prerequisites first.