LXML:无法导入etree [英] LXML: Cannot import etree

查看:390
本文介绍了LXML:无法导入etree的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我转到此页面并下载了tar文件:http://pypi.python.org/pypi/lxml/2.3.4#downloads

I went to this page and downloaded the tar file : http://pypi.python.org/pypi/lxml/2.3.4#downloads

然后我将lxml文件夹复制到了我的Python26/Lib文件夹中.现在,当我转到解释器并键入from lxml import etree时,出现错误:cannot import etree.有人知道出了什么问题吗?我正在运行Windows.

I then copied the lxml folder to my Python26/Lib folder. Now, when i go to the interpreter and type from lxml import etree i get the error: cannot import etree. Does someone know what is going wrong? I am running windows.

推荐答案

最好遵循安装说明; lxml具有一些需要编译的C组件.

Better follow the installation instructions; lxml has some C components that require compilation.

我猜您是在Windows上,在这种情况下, binary鸡蛋应该起作用.在PyPI上,包含Windows二进制鸡蛋的最新版本是 2.3 ,但是您可以在其他地方找到更多(非官方)安装程序.

I am guessing that you are on Windows, in which case the binary egg should work. On PyPI, the most recent version to include binary eggs for Windows is 2.3, but you can find more recent (unofficial) installers elsewhere.

这篇关于LXML:无法导入etree的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆