2010-08-02 84 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