【发布时间】:2011-11-26 05:03:16
【问题描述】:
我正在尝试安装 MySQL-python 包,但出现以下错误:
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-Wno-long-double"
error: Setup script exited with error: command 'gcc' failed with exit status 1
我正在使用Mac OSX version 10.6.8 和 gcc
bash-3.2$ gcc --version
gcc (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
我该如何解决这个问题?
谢谢
【问题讨论】:
-
什么版本的 Python?
-arch可能意味着 mysql-python 正在尝试编译成 i386 或 x86_64,无论是哪个,你的 Python 都不喜欢它。 -
该错误与Python直接无关。错误来自
gcc。-arch是 Apple 对gcc的扩展,仅在 Xcode 中随附的 Apple 提供的gcc中找到。 -
这个问题已经解决,我已经添加了我的答案。谢谢内德和科迪
标签: python macos mysql-python