错误(Mac OS):sudo pip安装MySQl-python [英] Error(Mac OS): sudo pip install MySQl-python

查看:171
本文介绍了错误(Mac OS):sudo pip安装MySQl-python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有命令问题

  sudo pip install MySQl-python 
/ pre>

所有日志:

 下载/解包MySQl-python 
下载MySQL-python-1.2.5.zip(108kB):108kB下载
运行setup.py(路径:/private/tmp/pip_build_root/MySQl-python/setup.py)包装MySQl的egg_info -python

安装收集的软件包:MySQl-python
运行setup.py安装MySQl-python
构建'_mysql'扩展名
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-inte l-2.7 / _mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64
clang:error:unknown参数:'-mno-fused-madd'[-Wunused-command -line-argument-hard-error-in-future]
clang:注意:这将是一个硬错误(不能降级为警告)在将来
错误:命令'cc'失败与退出状态1
从命令完成输出/ usr / bin / python -cimport setuptools,tokenize; __ file __ ='/ private / tmp / pip_build_root / MySQl-python / setup.py'; exec(compile(getattr ('\\\\
','\\\
'),__file__,'exec'))install --record / tmp / pip -1ySuuV-record / install-record.txt - 单一版本 - 外部管理--compile:
运行安装
运行build
运行build_py
创建构建
创建构建/ lib.macosx-10.9-intel-2.7
复制_mysql_exceptions.py - > build / lib.macosx-10.9-intel-2.7
...
复制MySQLdb / constants / CLIENT.py - > build / lib.macosx-10.9-intel-2.7 / MySQLdb / constants

运行build_ext

构建'_mysql'扩展名

创建构建/临时.macosx-10.9-intel-2.7

cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno- fusion-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参数:'-mno -fused-madd'[-Wunused-command-line-argument-hard-error-in-future]
clang:注意:这将是未来的一个硬错误(不能降级为警告)
错误:命令'cc'失败,退出状态1
- ---------------------------------------
清理...
命令/ usr / bin / python -cimport setuptools,tokenize; __ file __ ='/ private / tmp / pip_build_root / MySQl-python / setup.py'; exec(compile(getattr(tokenize,'open',open) (__file __)。read()。replace('\r\\\
','\\\
'),__file__,'exec'))install --record / tmp / pip-1ySuuV-record / install-record .txt - 单独版本 - 外部管理 - 编译失败,错误代码1在/ private / tmp / pip_build_root / MySQl-python
存储调试日志失败在/ Users / Detonavomek / Library / Logs / pip我已经下载Mysql,Xcode和命令行工具了.log

我有另外一个brew(brew link)的问题,而且这个问题与这个问题有关。

解决方案

mac os 10.9.1上的mysql-python



通过运行修复它:



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

之前`pip install ...```



支持罗密欧Mihalcea回答自己的问题。 p>

I have problem on command

sudo pip install MySQl-python

All log:

  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

I already download Mysql, Xcode and Command Line Tools. I have another problem with brew(brew link), and I thing that it is linked with this problem.

解决方案

From mysql-python on mac os 10.9.1

Fixed it by running:

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

before `pip install...```

Props to Romeo Mihalcea for answering his own question.

这篇关于错误(Mac OS):sudo pip安装MySQl-python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆