在Windows上调试安装适用于Python 2.x的LXML

时间:2019-04-25 23:24:54

标签: python windows lxml

我绝对没有使用Python进行编程的经验,但是我试图建立一些模块来实现this project,并且在lxml方面很费劲。我搜寻了很多帮助论坛,试图弄清楚如何设置lxml,到目前为止,所有解决方案都没有帮助。

我尝试过的事情:

this website下载lxml文件。我正在运行Python 2.7.9,并尝试使用该网站上的两个cp27文件。两者都给我相同的信息:

lxml-4.3.3-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

经过更多的搜寻之后,它看起来像命令:

python -m pip install lxml

应该是一个可行的选择。但是,这会导致这些错误消息(不是完整的空间节省输出,但是作为相关部分让我感到震惊):

c:\users\aeon~1.wil\appdata\local\temp\xmlXPathInityhhfkk.c(1) : fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory

*********************************************************************************

Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

*********************************************************************************

error: command 'C:\\Users\\aeon.williams\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

我从here下载了libxml2轮,并成功运行了... cp27-none-win32.whl。此后,我尝试再次运行python -m pip install lxml,但仍然收到相同的错误消息。

我确定我正在苦苦挣扎,因为我对Python模块和pip的了解很少,但是我不确定现在应该朝哪个方向努力以使lxml在我的计算机上正常工作。如果有人有任何建议,请让我知道!

0 个答案:

没有答案