您的位置:首页 > 编程语言 > Python开发

Python之easy_install安装出错

2014-03-27 22:14 176 查看
环境: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
希望对大家有帮助。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: