![](/img/trans.png)
[英]Got error on installing pyfastext on Mac: command 'cc' failed with exit status 1
[英]error: command 'cc' failed with exit status 1 - MySQLdb installation on MAC
我是Mac的新手,我正在嘗試在MAC上安裝MySQLdb for Python但是在按照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
在執行之前嘗試在終端上設置:
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'
在這里找到它: https : //jamesfriend.com.au/installing-pygame-python-mac-os-108-mountain-lion
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.