MySQLpython1.2.4b4 OSX组件

2024-04-28 03:58:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图从源代码处安装mysql python,但在出现以下错误之前,编译似乎会被出售:

>running build_ext
>
>building '_mysql' extension
>
>ccreating build/temp.macosx-10.7-intel-2.7
>llvm-gcc-4.2 -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,4,'beta',4) -D__version__=1.2.4b4 -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.7-intel-2.7/_mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing ->arch i386
>
>cc1: error: unrecognized command line option "-Wno-null-conversion"
>
>error: command 'llvm-gcc-4.2' failed with exit status 1

Tags: buildosmysqlcommontempmacosxllvmgcc
1条回答
网友
1楼 · 发布于 2024-04-28 03:58:34

首先看起来您正在尝试安装一个beta版,除非这是您想要的,否则我强烈建议您使用pip进行安装

您似乎遇到的错误是处理gcc不理解其中一个命令行选项。在

这里有一个链接,指向您要安装的lib的最新版本

https://pypi.python.org/pypi/MySQL-python/1.2.4

我会试试的。在

或者从安装程序中删除无效选项。在

相关问题 更多 >