2014-03-13 69 views
4

我有問題的命令錯誤(Mac OS)中:sudo的PIP安裝MySQL-python的

sudo pip install MySQl-python 

的所有日誌:

Downloading/unpacking MySQl-python 
    Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded 
    Running setup.py (path:/private/tmp/pip_build_root/MySQl-python/setup.py) egg_info for package MySQl-python 

Installing collected packages: MySQl-python 
    Running setup.py install for MySQl-python 
    building '_mysql' extension 
    cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/mysql/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 -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64 
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] 
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future 
    error: command 'cc' failed with exit status 1 
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/MySQl-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1ySuuV-record/install-record.txt --single-version-externally-managed --compile: 
    running install 
running build 
running build_py 
creating build 
creating build/lib.macosx-10.9-intel-2.7 
copying _mysql_exceptions.py -> build/lib.macosx-10.9-intel-2.7 
... 
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants 

running build_ext 

building '_mysql' extension 

creating build/temp.macosx-10.9-intel-2.7 

cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/mysql/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 -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64 
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] 
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future 
error: command 'cc' failed with exit status 1 
---------------------------------------- 
Cleaning up... 
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/MySQl-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1ySuuV-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/MySQl-python 
Storing debug log for failure in /Users/Detonavomek/Library/Logs/pip.log 

我已經下載的Mysql,Xcode和命令行工具。我有另一個問題與釀造(釀造鏈接),我的事情,它與這個問題有關。

回答

6

mysql-python on mac os 10.9.1

運行固定它:

出口CFLAGS = -Qunused論點 出口CPPFLAGS =前`PIP安裝...```-Qunused論點

道具羅密歐Mihalcea回答了自己的問題。