安装libxml2和关联的python绑定-Windows [英] Install libxml2 and associated python bindings - Windows

查看:83
本文介绍了安装libxml2和关联的python绑定-Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am attempting to install libxml2 so that I can setup the python bindings and eventually use lxml.

但是我在地球上无法工作,我应该将文件解压缩. 我无法成功Google.

However I am unable to work out here on earth I am supposed to be unzipping the files. I haven't been able to google successfully.

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

Do I need Cygwin/MinGW for the installation to be successful?

目前,我的Python文件夹中分别有libxml2.tar.gz和libxslt.tar.gz中的文件.因此,包含在tar中的文件位于Python26 \ include \ libxml2 \ libxml ...等中.

At the moment I have the files from the libxml2.tar.gz and libxslt.tar.gz in their respective directories within my Python folder. So files that were in the tars under include are in Python26\include\libxml2\libxml... and so on.

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

however when i run a easy_install lxml i receive the following output:

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

任何帮助都是非常有用的,因为我已经尝试了一个多星期:(

Any help whatsoever would be very helpful as I've been trying to get this going for over a week now :(

谢谢

推荐答案

如果没有特殊原因从源代码进行编译,则可以使用

If you don't have special reasons to compile from source, you can use prebuilt binaries for lxml

这篇关于安装libxml2和关联的python绑定-Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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