2010-08-02 78 views
0

我试图在OS X(10.6.4)上使用python.org python(Python 2.6.4(r264:75821M)安装各种python扩展,2009年10月27日,19:48:32))。在gcc步骤中一直遇到问题。下面是编译用Cython样本(顺便说一句,我试图安装用Cython为了安装LXML):在OS X上安装Python扩展,缺少MacOSX10.4u.sdk错误

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?

回答

0

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

+1

对于在10.6上运行的其他人:您不需要卸载Xcode。只需启动10.6 Xcode安装程序并选择10.4 SDK的自定义安装。 – 2010-08-03 06:08:41

+0

谢谢奈德。我在尝试使用它之前尝试了大约一百万个随机事件,因此卸载xcode大多只是工作中的迷信。 – Parand 2010-08-03 07:14:48