我正在嘗試安裝libxml2,以便我可以設置python綁定並最終使用lxml。安裝libxml2和相關的python綁定 - Windows
但是我無法在地球上工作,我應該解壓縮這些文件。 我一直無法成功谷歌。
我需要使用Cygwin/MinGW進行安裝才能成功嗎?
目前,我的libxml2.tar.gz和libxslt.tar.gz文件位於我的Python文件夾的各自目錄中。因此,包含在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
,因爲我一直試圖讓這個打算,現在一個多星期:(
任何任何幫助將是非常有益感謝
我有同樣的問題,試圖安裝lxml 2.2.6(我也試過2.2.4和2.2.5)。令人煩惱的是,我不得不依照以下S.Mark的建議,使用2.2.2的預建庫。 如果有人能夠編譯Python 2.6的2.2.6版本(畢竟有2.4和2.5版本),那將是非常好的:/ – ropable 2010-05-21 02:33:08
回答這個問題:http:// stackoverflow。com/questions/3047542 /#5122521 – 2011-02-25 21:06:57