我嘗試:不能安裝LXML(蟒蛇2.6.3,OSX 10.6雪豹)
easy_install lxml
,我得到這個錯誤:
File "build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py", line 85, in get_ext_filename KeyError: 'etree'
任何提示?
我嘗試:不能安裝LXML(蟒蛇2.6.3,OSX 10.6雪豹)
easy_install lxml
,我得到這個錯誤:
File "build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py", line 85, in get_ext_filename KeyError: 'etree'
任何提示?
由於2.6.3版本python distutils的變化不兼容,原easy_install
從setuptools不再有效。您需要用從Distribute替換它。按照指示,基本上是:
$ curl -O http://nightly.ziade.org/distribute_setup.py
$ python distribute_setup.py
假設2.6.3 python
首先是在你的$PATH
。
編輯:除了從setuptools的遷移到分發選項,Python的2.6.4,它應該在幾個星期的發佈,將包含一個workaround中的distutils即會unbreak setuptools。謝謝,Tarek,爲了解決這個問題,並感謝jbastos。
進一步編輯:setuptools本身已被更新(截至0.6c10
)以解決2.6.3的問題。
斯內德:
incompatible changes in the 2.6.3 version of python's distutil
不準確。 API沒有改變,但Setuptools覆蓋了它們,並且假設它們按特定的順序被調用。
倫納特:
The Distribute installation doesn't seem to trigger the bug
確實如此,前一段時間發現並固定在分配(在Ubuntu的setuptools的包)
@Tarek:Setuptools是否是一個好主意並不重要。事實是,它已經有很長一段時間了,現在它在2.6.3中不起作用,所以用戶必須改變他們一直在做的事情,而且他們沒有辦法知道這一點。從setuptools移動到Distribute是好的,但easy_install的用戶需要知道他們必須這樣做 – 2009-10-03 17:19:18
@Ned:所以我們告訴他們。 :) – 2009-10-06 06:40:31
我這樣做,這種精確的錯誤,但現在我得到另一個錯誤 >在包含在libxml.h中的文件中:53, > from SAX.c:12: > trio.h:37:19:error:stdio.h:沒有這樣的文件或目錄 – jbastos 2009-10-03 03:30:48
您是否安裝了可選的10.4 SDK Xcode的? ls /Developer/SDKs/MacOSX10.4u.sdk/ xml2-config的輸出是什麼--libs --prefix? – 2009-10-03 04:06:50
實際上,如果你安裝了setuptools,你可以簡單地easy_install分發。分發安裝似乎沒有觸發錯誤。 – 2009-10-03 12:12:48