安装libxml2和相关的python绑定- Windows

2024-05-19 08:36:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试安装libxml2,以便可以设置python绑定并最终使用lxml。

然而,我不能在地球上工作,我应该是解压缩的文件。 我没能成功地用谷歌搜索。

我需要Cygwin/MinGW才能成功安装吗?

目前,我已经将libxml2.tar.gz和libxslt.tar.gz中的文件放在Python文件夹中各自的目录中。所以在include下的tars中的文件在Python26-include-libxml2-libxml中。。。等等。

但是,当我运行easy_install lxml时,会收到以下输出:

Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.2.4
Downloading http://codespeak.net/lxml/lxml-2.2.4.tgz
Processing lxml-2.2.4.tgz
Running lxml-2.2.4\setup.py -q bdist_egg --dist-dir c:\users\rocco\appdata\local
\temp\easy_install-1xwbhy\lxml-2.2.4\egg-dist-tmp-9zwhe4
Building lxml version 2.2.4.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' need
s to be available.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
error: Setup script exited with error: Unable to find vcvarsall.bat

任何帮助都会很有帮助,因为我已经试了一个多星期了

谢谢


Tags: 文件tonosrchttpfileslxmldirectory

热门问题