在OS X上安装Python扩展,缺少MacOSX10.4u.sdk错误

时间:2010-08-02 18:40:00

标签: python lxml cython

我正在尝试在OS X(10.6.4)上安装各种python扩展,使用python.org python(Python 2.6.4(r264:75821M,2009年10月27日,19:48:32))。一直遇到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以及installation instructions from the lxml site获胜的食谱,他们最终都遇到了同样的问题。

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

或者是否有更好的解决方法,不需要旧的SDK?

1 个答案:

答案 0 :(得分:0)

在经历了一次不必要的痛苦之后,主要是由于我自己的固执,这是通过卸载xcode并重新安装来解决的,这次在安装过程中检查了SDK 10.4支持。