gpt4 book ai didi

python - 错误 : command 'cc' failed with exit status 1 - MySQLdb installation on MAC

转载 作者:太空狗 更新时间:2023-10-29 21:31:47 25 4
gpt4 key购买 nike

我是 Mac 的新手,我正在尝试在 MAC 上为 Python 安装 MySQLdb,但在执行了 http://www.tutorialspoint.com/python/python_database_access.htm 中提到的步骤之后, 运行后报错

$ 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我应该怎么办?

最佳答案

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

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

关于python - 错误 : command 'cc' failed with exit status 1 - MySQLdb installation on MAC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21638444/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com