[英]error: command 'cc' failed with exit status 1 - MySQLdb installation on MAC
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 我是Mac的新手,我正在尝试在MAC上安装MySQLdb for Python但是在按照http://www.tutorialspoint.com/python/python_database_access.htm上提到的步骤操作后,我在运行后收到错误
$ python setup.py build
Error: 错误:
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
Note: My "mysql_config" path is /Applications/MAMP/Library/bin/mysql_config What should i do? 注意:我的“mysql_config”路径是/ Applications / MAMP / Library / bin / mysql_config我该怎么办?
The problem is unused arguments passed to compiler. 问题是传递给编译器的未使用的参数。 Try this before running your build code: 在运行构建代码之前尝试此操作:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Try setting this on the terminal before executing: 在执行之前尝试在终端上设置:
export CC='/usr/bin/gcc'
export CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -I/opt/X11/include -arch i386 -arch x86_64'
export LDFLAGS='-arch i386 -arch x86_64'
export ARCHFLAGS='-arch i386 -arch x86_64'
found it here: https://jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion 在这里找到它: https : //jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.