Compiler construction mac os 10.9.1上的mysql python

Compiler construction mac os 10.9.1上的mysql python,compiler-construction,pip,mysql-python,easy-install,Compiler Construction,Pip,Mysql Python,Easy Install,我似乎无法在10.9.1上安装mysql python。我怀疑这与最新的命令行工具更新有关,但我不是专家: Running MySQL-python-1.2.5/setup.py -q bdist_egg --dist-dir /var/folders/s7/j138zlt172nf6qqpn98rhzhm0000gn/T/easy_install-kq86vo/MySQL-python-1.2.5/egg-dist-tmp-edndmM clang: error: unknown argume

我似乎无法在10.9.1上安装mysql python。我怀疑这与最新的命令行工具更新有关,但我不是专家:

Running MySQL-python-1.2.5/setup.py -q bdist_egg --dist-dir /var/folders/s7/j138zlt172nf6qqpn98rhzhm0000gn/T/easy_install-kq86vo/MySQL-python-1.2.5/egg-dist-tmp-edndmM
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: Setup script exited with error: command 'cc' failed with exit status 1
你知道如何克服这个问题吗

pip也有同样的错误。

通过运行以下命令修复了该错误:


export CFLAGS=-Qunused参数
导出CPPFLAGS=-QUUSED参数


在“pip安装…”之前,`

我只想改进您的答案,这对我也有帮助:

在MacShell上执行以下操作:

sudo su
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install MySQL-python
否则,将不使用这些选项


干杯

我不知道。我不记得是在哪里找到的,但它看起来像是为编译器设置了ENV,使其不会对未使用的参数抱怨太多。不知道为什么,但接受的答案对我不起作用。这一次很快就成功了,所以我猜导出对sudo用户不起作用?@Hal,没错。导出是在usercontext中进行的。它们在根上下文中无效。因此,在切换到root之后,必须执行这些操作。