我正在尝试安装python软件包,它已出现错误: 找不到zlib的标头或库文件, 从源编译枕头时需要的依赖项。
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
File "/private/var/folders/9j/0_rhbqrn35g_bgmk0xm72px5641b21/T/pip-install-1irnygzu/pillow/setup.py", line 612, 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/9j/0_rhbqrn35g_bgmk0xm72px5641b21/T/pip-install-1irnygzu/pillow/setup.py", line 812, 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
----------------------------------------
Rolling back uninstall of Pillow
Moving to /usr/local/lib/python3.8/site-packages/PIL/
from /usr/local/lib/python3.8/site-packages/~IL
Moving to /usr/local/lib/python3.8/site-packages/Pillow-6.2.1.dist-info/
from /usr/local/lib/python3.8/site-packages/~illow-6.2.1.dist-info
ERROR: Command errored out with exit status 1: /usr/local/opt/python@3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9j/0_rhbqrn35g_bgmk0xm72px5641b21/T/pip-install-1irnygzu/pillow/setup.py'"'"'; __file__='"'"'/private/var/folders/9j/0_rhbqrn35g_bgmk0xm72px5641b21/T/pip-install-1irnygzu/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 /private/var/folders/9j/0_rhbqrn35g_bgmk0xm72px5641b21/T/pip-record-44_dldb6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pillow Check the logs for full command output.```
Versions:
python: 3.8.3
pillow: 6.2.1 (tried with latest 7.2.0 as well)
pip3 : 20.2.3
Any help would be appreciated to resolve this