2016-02-19 91 views
1

我試圖在Windows上安裝lxml。我正在運行python 3.5。 我用win安裝程序,沒有工作。它給了我一個錯誤,說Python 3.2沒有找到。我使用PIP或使用easy_install它試圖安裝,然後給了我一個錯誤說lxml for python 3.5

C:\Users\>easy_install lxml 
Searching for lxml 
Reading https://pypi.python.org/simple/lxml/ 
Best match: lxml 3.5.0 
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.5.0.tar.gz#md5 
=9f0c5f1eb43ff44d5455dab4b4efbe73 
Processing lxml-3.5.0.tar.gz 
Writing C:\Users\vasisht\AppData\Local\Temp\easy_install-ze62aj3w\lxml-3.5.0\setup.cfg 
Running lxml-3.5.0\setup.py -q bdist_egg --dist-dir  
C:\Users\...\AppData\Local\Temp\easy_install-ze62aj3w\lxml-3.5.0\egg-dist-tmp-cwiu9v46 
Building lxml version 3.5.0. 
Building without Cython. 
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n" 
** make sure the development packages of libxml2 and libxslt are installed ** 

Using build configuration of libxslt 
error: Setup script exited with error: Unable to find vcvarsall.bat 

我一直在抓我的頭和一個答案淘谷歌。請爲我揭開一些光。由於

+1

可能的重複[如何指出easy \ _install到vcvarsall.bat?](http://stackoverflow.com/questions/6551724/how-do-i-point-easy-install-to-vcvarsall-bat) – Arman

+1

看看這些文檔:http://lxml.de/installation.html#source-builds-on-ms-windows – chishaku

回答

1

嘗試:

的LXML包在一個倉庫使用水銀和汞 - git的插件開發Github上。您可以使用檢索當前開發者版本:

hg clone git://github.com/lxml/lxml.git lxml 

這將創建一個目錄LXML並下載源進去,包括完整的發展歷史。不要害怕,下載相當快。您也可以通過Web瀏覽lxml存儲庫。

克隆如上所述(或下載源焦油球和解壓),然後鍵入源存儲庫:

python setup.py build 

(C)http://lxml.de/build.html#building-the-sources

您羅納爾多,也很想可以使用PIP源安裝

pip install -e git+git://github.com/lxml/lxml.git#egg=lxml 

有記住,LXML需要Cython

+0

'hg clone git://github.com/lxml/lxml.git lxml'或'git clone git://github.com/lxml/lxml.git lxml ' –

0

首先安裝CPython的,(PIP安裝CPython的) 它已經在你的錯誤代碼中提到,其中蟒蛇告訴你: ERROR:B「‘XSLT的配置’不被識別爲一個內部或外部命令, \ r \ noperable程序或批處理文件。\ r \ n」個

那麼的libxml(2)的libxslt從http://www.xmlsoft.org/downloads.html

安裝LXML(PIP安裝LXML)

只是首發PL嘗試它可能工作爲你和其他人