错误:命令'cc'失败,退出状态1 - MAC上的MySQLdb安装

Osa*_*war 7 python mysql-python

我是Mac的新手,我正在尝试在MAC上安装MySQLdb for Python但是在按照http://www.tutorialspoint.com/python/python_database_access.htm上提到的步骤操作后,我在运行后收到错误

$ python setup.py build
Run Code Online (Sandbox Code Playgroud)

错误:

clang: warning: argument unused during compilation: '-mno-fused-madd'
_mysql.c:44:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
     ^
1 error generated.
error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

注意:我的"mysql_config"路径是/ Applications/MAMP/Library/bin/mysql_config我该怎么办?

ABr*_*ros 9

问题是传递给编译器的未使用的参数.在运行构建代码之前尝试此操作:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Run Code Online (Sandbox Code Playgroud)