无法安装lxml(python 2.6.3,osx 10.6雪豹)
我尝试:
easy_install lxml
我收到此错误:
文件“build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py”,第 85 行,在 get_ext_filename 中 关键错误:'etree'
有任何提示吗?
I try to:
easy_install lxml
and I get this error:
File "build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py", line 85, in get_ext_filename
KeyError: 'etree'
any hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于 python distutils 2.6.3 版本中的不兼容更改,旧的
easy_install
来自 setuptools 不再起作用。您需要将其替换为 Distribute 中的easy_install
。基本上按照那里的说明进行操作:假设 2.6.3
python
位于您的$PATH
上。编辑:除了从 setuptools 迁移到 Distribute 的选项之外,应在几周内发布的 Python 2.6.4 将包含 distutils 中的解决方法,将解除安装工具的破坏。感谢 Tarek 的修复,也感谢 jbastos 提出这个问题。
进一步编辑: setuptools 本身已更新(从
0.6c10
开始) ) 来解决 2.6.3 中的问题。Due to incompatible changes in the 2.6.3 version of python's distutils, the old
easy_install
from setuptools no longer works. You need to replace it witheasy_install
from Distribute. Follow the instructions there, basically:assuming the 2.6.3
python
is first on your$PATH
.EDIT: Besides the option to migrate from setuptools to Distribute, Python 2.6.4, which should be released in a couple of weeks, will contain a workaround in distutils that will unbreak setuptools. Thanks, Tarek, for the fix and thanks, jbastos, for bringing this issue up.
FURTHER EDIT: setuptools itself has been updated (as of
0.6c10
) to work around the problem with 2.6.3.内德:
不准确。 API 没有改变,但安装工具会覆盖它们,并假设它们是按特定顺序调用的。
伦纳特:
,确实,这个错误是前一段时间检测到的,并在 Distribute(以及 Ubuntu 的 setuptools 包中)中修复
Ned :
Not precisely. The API hasn't changed but Setuptools overrides them, and makes the assumption they are called in a particular order.
Lennart:
Yes indeed, this precise bug was detected some time ago and fixed in Distribute (and in Ubuntu's setuptools package)