简体   繁体   English

错误:命令'cc'失败,退出状态1 - MAC上的MySQLdb安装

[英]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.

相关问题 在 Mac 上安装 pyfastext 时出错:命令“cc”失败,退出状态为 1 - Got error on installing pyfastext on Mac: command 'cc' failed with exit status 1 GDAL错误:命令'cc'失败,退出状态为1 - GDAL error: command 'cc' failed with exit status 1 错误:命令“cc”在 Mac 上失败,退出状态为 1,用于 pip install MySQL-python - error: command 'cc' failed with exit status 1 on Mac for pip install MySQL-python MySQLdb Python连接器构建和安装命令'gcc-4.2'失败,退出状态为255 - MySQLdb Python connector building and installation command 'gcc-4.2' failed with exit status 255 VerificationError:CompileError:命令“ cc”失败,退出状态为1 - VerificationError: CompileError: command 'cc' failed with exit status 1 枕头安装错误:命令“ gcc”失败,退出状态为1 - Pillow installation error: command 'gcc' failed with exit status 1 biopython安装:错误:命令“ gcc”失败,退出状态为1 - biopython installation: error: command 'gcc' failed with exit status 1 Pyaudio 安装错误 - 'command 'gcc' 失败,退出状态为 1' - Pyaudio installation error - 'command 'gcc' failed with exit status 1' Python模块安装错误:命令'gcc'失败,退出状态为1 - Python module installation error: command 'gcc' failed with exit status 1 lxml 安装:错误:命令“gcc”失败,退出状态为 1 - lxml installation: error: command 'gcc' failed with exit status 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM