【发布时间】:2010-12-03 12:11:51
【问题描述】:
我尝试:
easy_install lxml
我得到这个错误:
文件“build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py”,第 85 行,在 get_ext_filename 键错误:'etree'
有什么提示吗?
【问题讨论】:
标签: python macos port osx-leopard lxml
我尝试:
easy_install lxml
我得到这个错误:
文件“build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py”,第 85 行,在 get_ext_filename 键错误:'etree'
有什么提示吗?
【问题讨论】:
标签: python macos port osx-leopard lxml
内德:
python的distutil 2.6.3版本的不兼容变化
不准确。 API 没有改变,但 Setuptools 会覆盖它们,并假设它们是按特定顺序调用的。
伦纳特:
Distribute 安装似乎没有触发错误
确实,这个精确的错误是前段时间检测到的,并在 Distribute(和 Ubuntu 的 setuptools 包中)修复了
【讨论】:
由于 2.6.3 版本的 python 的 distutils 中的不兼容更改,来自 setuptools 的旧 easy_install 不再有效。您需要将其替换为来自Distribute 的easy_install。基本上按照那里的说明进行操作:
$ curl -O http://nightly.ziade.org/distribute_setup.py
$ python distribute_setup.py
假设 2.6.3 python 首先出现在您的 $PATH 上。
编辑:除了从 setuptools 迁移到 Distribute 的选项之外,应该在几周内发布的 Python 2.6.4 将在 distutils 中包含一个 workaround ,它将为 unbreak setuptools。感谢 Tarek 的修复,感谢 jbastos 提出这个问题。
进一步编辑:setuptools 本身已更新(截至0.6c10)以解决 2.6.3 的问题。
【讨论】: