错误:命令"cc"失败,退出状态为1-MAC上的MySQLdb安装 [英] error: command 'cc' failed with exit status 1 - MySQLdb installation on MAC

查看:163
本文介绍了错误:命令"cc"失败,退出状态为1-MAC上的MySQLdb安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am new to Mac and i am trying to install MySQLdb for Python on MAC but after following the steps mentioned on http://www.tutorialspoint.com/python/python_database_access.htm, i received an error after running

$ python setup.py build

错误:

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

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

Note: My "mysql_config" path is /Applications/MAMP/Library/bin/mysql_config What should i do?

推荐答案

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

The problem is unused arguments passed to compiler. Try this before running your build code:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

这篇关于错误:命令"cc"失败,退出状态为1-MAC上的MySQLdb安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆