无法安装lxml(python 2.6.3,osx 10.6雪豹)

发布于 2024-08-06 07:45:14 字数 246 浏览 1 评论 0原文

我尝试:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我不咬妳我踢妳 2024-08-13 07:45:14

由于 python distutils 2.6.3 版本中的不兼容更改,旧的 easy_install 来自 setuptools 不再起作用。您需要将其替换为 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 中的解决方法,将解除安装工具的破坏。感谢 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 with easy_install from Distribute. Follow the instructions there, basically:

$ curl -O http://nightly.ziade.org/distribute_setup.py
$ python distribute_setup.py

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.

Spring初心 2024-08-13 07:45:14

内德:

Python distutil 2.6.3 版本中的不兼容更改

不准确。 API 没有改变,但安装工具会覆盖它们,并假设它们是按特定顺序调用的。

伦纳特:

分布式安装似乎没有触发该错误

,确实,这个错误是前一段时间检测到的,并在 Distribute(以及 Ubuntu 的 setuptools 包中)中修复

Ned :

incompatible changes in the 2.6.3 version of python's distutil

Not precisely. The API hasn't changed but Setuptools overrides them, and makes the assumption they are called in a particular order.

Lennart:

The Distribute installation doesn't seem to trigger the bug

Yes indeed, this precise bug was detected some time ago and fixed in Distribute (and in Ubuntu's setuptools package)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文