0

我正在尝试使用 python.org python (Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32)) 在 OS X (10.6.4) 上安装各种 python 扩展。在 gcc 步骤中始终遇到问题。这是编译 Cython 的示例(顺便说一句,我正在尝试安装 Cython 以安装 lxml):

In file included from /usr/include/architecture/i386/math.h:626,
                 from /usr/include/math.h:28,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyport.h:235,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:58,
                 from /tmp/easy_install-Sgn5ep/Cython-0.12.1/Cython/Plex/Scanners.c:4:
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.4u.sdk
Please check your Xcode installation
ld: library not found for -lbundle1.o
ld: library not found for collect2: -lbundle1.o
collect2: ld returned 1 exit status

尝试以各种方式安装 lxml 时出现类似错误。我已经尝试了Simon's question中的成功秘诀,以及来自 lxml 站点的安装说明,它们最终都遇到了同样的问题。

我真的需要安装旧的 OS X SDK 吗?如果是这样,我在哪里可以找到它(搜索似乎没有找到任何官方下载位置)。

还是有不需要旧 SDK 的更好的解决方法?

4

1 回答 1

0

在经历了不必要的痛苦(主要是我自己的固执造成的)之后,通过卸载 xcode 并重新安装解决了这个问题,这次在安装过程中检查了 SDK 10.4 支持。

于 2010-08-03T00:42:24.040 回答