python - 如何在 Macosx 10.9 上安装 PIL?

标签 python macos python-imaging-library

当我尝试在 Macosx 10.9.2 上安装 PIL 库时,出现以下错误,请教如何安装。

$: sudo pip install pillow

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.5.2/include/freetype2 -I/private/tmp/pip_build_root/pillow/libImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

最佳答案

以下行帮助了我。

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pillow

关于python - 如何在 Macosx 10.9 上安装 PIL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22449304/

相关文章:

python - 如何在 Python Eve 中禁用自动生成的字段?

python - python中从PDF中提取图像时出错

r - R 4.02 中大矩阵的 SVD 总线错误

objective-c - 如何在 Objective-C 中创建首选项窗口?

macos - 我无法通过 Homebrew 软件在 Mac M1 上安装 v8@3.15

python - 如何在PIL中将灰度图像转换为给定的彩色单色图像?

python-3.x - 如何安装适用于 Python 3.6 的 PIL/Pillow?

python - python中的俄语字符解码

python - 检测和隔离绿色网球 table 板上的线条

python - 如何使用Python Pillow/Image将小图像插入照片的一角?