Python 命令';抄送';安装了Xcode5.1并更改了site.cfg后,mysql_config无法安装失败

Python 命令';抄送';安装了Xcode5.1并更改了site.cfg后,mysql_config无法安装失败,python,mysql,django,macos,python-2.7,Python,Mysql,Django,Macos,Python 2.7,在Mac上,我想为django安装mysql python 跑 给我看看 File "<string>", line 17, in <module> File "/private/tmp/pip_build_root/MySQL-python/setup.py", line 17, in <module> metadata, options = get_config() File "setup_posix.py", line 43, in g

在Mac上,我想为django安装mysql python

给我看看

 File "<string>", line 17, in <module>
  File "/private/tmp/pip_build_root/MySQL-python/setup.py", line 17, in <module>
    metadata, options = get_config()
  File "setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "setup_posix.py", line 25, in mysql_config
    raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
我得到一个错误:

运行构建 运行build\u py 正在复制MySQLdb/release.py->build/lib.macosx-10.9-intel-2.7/MySQLdb 运行build_ext 正在生成“\u mysql”扩展 cc-fno严格别名-fno common-dynamic-g-Os-pipe-fno common-fno严格别名-fwrapv-mno fused madd-DENABLE_DTRACE-DMACOSX-DNDEBUG-Wall-Wstrict原型-Wshorten-64-to-32-DNDEBUG-g-fwrapv-Os-Wall-Wstrict原型-DENABLE_DTRACE-pipe-Dversion_info=(1,2,5,'final','1)-D_uuuversion_uuuuu=1.2.5-I/usr/local/mysql-5.5.19-osx10.6-x86_64/include-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7-c_mysql.c-o build/temp.macosx-10.9-intel-2.7/mysql.o-Os-g-fno-common-fno-fno严格别名-arch x86_64 叮当声:错误:未知参数:'-mno fused madd'[-Wunused命令行参数将来出现硬错误] 叮当声:注意:这将是一个硬错误(不能降级为警告)在未来 错误:命令“cc”失败,退出状态为1

然后我试着像这个页面一样修复这个问题

对我没用

它仍然显示命令“cc”失败,退出状态为1


我该怎么办???????所以很伤心~~~~~~~差不多一天了~~~~

问题是安装没有找到mysql\u配置。您必须在安装目录的site.cfg文件中添加mysql_config的路径

# file : site.cfg  
mysql_config = /path/to/mysql_config

我发现了问题。一旦我安装了xcode模拟器,我就可以用

sudo -E python setup.py install

没问题。

我确实更改了site.cfg。然后获取命令“cc”失败,退出状态为1
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
# file : site.cfg  
mysql_config = /path/to/mysql_config
sudo -E python setup.py install