今天在mac上安装Pillow,一直报告这个错误:
<!-- lang: shell -->
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
----------------------------------------
Cleaning up...
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/v1/c7f2gbls7wxdj5hrj2zrqsz00000gn/T/pip_build_bluven/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/v1/c7f2gbls7wxdj5hrj2zrqsz00000gn/T/pip-cP3mHU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/v1/c7f2gbls7wxdj5hrj2zrqsz00000gn/T/pip_build_bluven/Pillow
Storing debug log for failure in /Users/bluven/Library/Logs/pip.log
在网上搜了半天,终于找到一个答案(这得感谢政府,要不是上stackoverflow速度慢了,我早就搜到了),解决方案是添加2个环境变量:
<!-- lang: shell -->
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
还不理解这是什么东西,晚上回去看看去。