2015-06-12 52 views
0

試圖安裝這個叫做Willie的Python IRC機器人。這是當我運行setup.py時會發生什麼:爲Python安裝Willie irc bot時出錯

C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.1\helpers\pycharm\pycharm_setup_runner.py" C:\Users\Quibbles\Documents\willie-5.3.0\setup.py 
Testing started at 1:35 PM ... 
running pycharm_test 
Searching for pygeoip 
Best match: pygeoip 0.3.2 
Processing pygeoip-0.3.2-py3.4.egg 

Using c:\users\quibbles\documents\willie-5.3.0\.eggs\pygeoip-0.3.2-py3.4.egg 
Searching for pyenchant 
Best match: pyenchant 1.6.6 
Processing pyenchant-1.6.6-py3.4-win32.egg 

Using c:\users\quibbles\documents\willie-5.3.0\.eggs\pyenchant-1.6.6-py3.4-win32.egg 
Searching for praw 
Best match: praw 2.1.21 
Processing praw-2.1.21-py3.4.egg 

Using c:\users\quibbles\documents\willie-5.3.0\.eggs\praw-2.1.21-py3.4.egg 
Searching for lxml 
Reading https://pypi.python.org/simple/lxml/ 
Best match: lxml 3.4.4 
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.4.4.tar.gz#md5=a9a65972afc173ec7a39c585f4eea69c 
Processing lxml-3.4.4.tar.gz 
Writing C:\Users\Quibbles\AppData\Local\Temp\easy_install-p_x9naya\lxml-3.4.4\setup.cfg 
Running lxml-3.4.4\setup.py -q bdist_egg --dist-dir C:\Users\Quibbles\AppData\Local\Temp\easy_install-p_x9naya\lxml-3.4.4\egg-dist-tmp-0expfysa 
Building lxml version 3.4.4. 
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 
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url' 
    warnings.warn(msg) 
cl : Command line warning D9025 : overriding '/W3' with '/w' 
lxml.etree.c 
C:\Users\Quibbles\AppData\Local\Temp\easy_install-p_x9naya\lxml-3.4.4\src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory 
error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2 

Process finished with exit code 1 

我在做什麼錯?我從https://github.com/embolalia/willie/releases/tag/v5.3.0下載了源代碼並嘗試在PyCharm中運行setup.py。

回答

-1

我給你的答案給了你一個從哪裏開始搜索的提示,但不是一個有用的答案。

我自己的幾次嘗試之後,我發現,要獲得安裝lxml的圖書館,我需要做到以下幾點:

首先,請從http://www.lfd.uci.edu/~gohlke/pythonlibs/

的lxml的圖書館這是必要的,因爲有管的檔案(https://pypi.python.org/pypi/lxml/3.4.4)已經過時了,只允許你選擇爲3 +系列安裝Python 3.2,如果你使用3.4系統,這當然是無用的。如果您使用的是64位,也有問題。不過,如果你使用2.7,它們可能就足夠了。

然後使用這裏的說明:How do I install a Python package with a .whl file?來安裝.whl文件。

但是,只修復了一半的問題。由於試圖引用類似於unix的/ tmp目錄(絕對路徑)而不是正確的Windows Temp目錄,因此willie軟件包似乎以其他方式中斷(在Windows上)。

這個問題能說明問題,雖然沒有固定尚未作出:https://github.com/embolalia/willie/issues/811

這表明它在安裝Windows的特定錯誤。若要解決,請從https://pypi.python.org/pypi/willie/5.3.0下載.tar.gz

將其解壓縮。轉到willie-5.3.0 \ willie.egg-info目錄,然後編輯SOURCES.txt文件。第五行是/tmp/tmpeAhjCF/willie。刪除該行。

將目錄重新打包到.tar.gz存檔中。通過pip install .\willie-5.3.0.tar.gz安裝。

現在已經安裝好了,你已經準備好迎接下一輪在Windows上運行運行的問題。由於我現在還沒有成功做到這一點,就我所能提供的幫助而言。

0

它應該是由錯誤信息很明顯:

**請確保安裝**

你需要有開發的libxml2 libxml2和中的libxslt開發包和libxslt已安裝。它看起來或許你有錯誤的版本,或者沒有正確安裝它們。