ren*_*box 14 python macos homebrew python-imaging-library pillow
我正在尝试安装Python Pillow库,我收到以下错误:
ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting
Run Code Online (Sandbox Code Playgroud)
我跟着线程尝试修复它:在Linux中安装Pillow(Python模块)时失败
问题是它似乎仍然无法找到我通过自制软件安装的zlib.
我检查了它是否已安装:
> brew search zlib
homebrew/dupes/zlib ? lzlib
Run Code Online (Sandbox Code Playgroud)
我注意到它与标准brew安装位置不同("homebrew/dupes/zlib").我尝试进行卸载/重新安装,然后将其放回到同一个地方("homebrew/dupes/zlib").问题似乎是安装程序/编译器在该位置找不到它.
我的问题是,有没有办法为lib路径设置别名,将安装程序指向此lib位置,或者将其从home-brew中彻底清除,以便像zlib一样重新安装它?最好的路线是什么?
谢谢,RB
ren*_*box 12
我想出了如何处理这个问题.我必须在pip安装之前通过环境变量设置以下标志,以确保在编译枕头时使用正确的zlib路径.
CFLAGS="-I/usr/local/opt/zlib/include" pip install pillow
Run Code Online (Sandbox Code Playgroud)
这很有效.
我有相同的情况(Homebrew zlib在/ usr/local/opt/zlib),但设置CFLAGS=…没有修复错误.
xcode-select --install 工作.
| 归档时间: |
|
| 查看次数: |
5366 次 |
| 最近记录: |