原文地址:http://blog.csdn.net/xanxus46/article/details/22325253
环境:mac os x 10.9.2
python版本:2.7.5
easy_install对于Python相当于apt之于Ubuntu,安装其他库十分方便,但是最近安装PIL(Python Imaging Library),这个强大的图形库时竟然出错了,十分抓狂。错误信息如下:
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
经网上查证:http://www.tuicool.com/articles/zI7Vzu,貌似是mac os的Xcode从5.1起给编译器规定对于未知参数传入视为error,我们需要使用ARCHFLAGS将该error降级为warning,因此最后的安装命令应该如下:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install PIL