Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
289 views
in Technique[技术] by (71.8m points)

Install libxml2 and associated python bindings - Windows

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

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.

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

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 Python26includelibxml2libxml... and so on.

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.4setup.py -q bdist_egg --dist-dir c:users
occoappdatalocal
empeasy_install-1xwbhylxml-2.2.4egg-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 'srclxml'
warning: no files found matching 'lxml.objectify.c' under directory 'srclxml'
warning: no files found matching 'lxml.etree.h' under directory 'srclxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'srclxml'
warning: no files found matching 'etree_defs.h' under directory 'srclxml'
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 :(

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The Windows binaries of the latest version of lxml (as well as a wide range of other Python packages) are available on http://www.lfd.uci.edu/~gohlke/pythonlibs/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...