Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装用于Python的Willie irc bot时出错_Python - Fatal编程技术网

安装用于Python的Willie irc bot时出错

安装用于Python的Willie irc bot时出错,python,Python,正在尝试安装名为Willie的Python IRC bot。这是我运行setup.py时发生的情况: 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

正在尝试安装名为Willie的Python IRC bot。这是我运行setup.py时发生的情况:

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

我做错了什么?我从下载了源代码,并尝试在PyCharm中运行setup.py。

错误消息应该很明显:

**确保已安装libxml2和libxslt的开发包**


您需要安装dev libxml2和libxslt。可能是版本错误,或者安装不正确。

I'L'I的答案提示您下一步从哪里开始搜索,但这不是一个有用的答案

在我自己多次尝试之后,我发现要安装lxml库,我需要执行以下操作:

首先,从下载lxml库

这是必要的,因为PiPy归档()已经过时了,只给了您为3+系列安装python3.2的选项,如果您使用的是3.4,这当然是无用的。如果使用64位,也会出现问题。但是,如果您使用的是2.7,它们可能就足够了

然后按照这里的说明:安装.whl文件

然而,这只解决了一半的问题。由于试图引用类unix的/tmp目录(绝对路径)而不是正确的Windows临时目录,willie软件包似乎以其他方式(在Windows上)被破坏

此问题描述了该问题,但尚未进行修复:

它表示安装程序中存在Windows特定的错误。要解决这个问题,请从下载.tar.gz

打开它。转到willie-5.3.0\willie.egg-info目录,编辑SOURCES.txt文件。第五行是
/tmp/tmpeAhjCF/willie
。删除那一行

将目录重新打包到.tar.gz存档中。通过
pip安装进行安装。\willie-5.3.0.tar.gz

现在它已经安装好了,您已经准备好迎接下一轮的问题,即如何让它在Windows上运行。因为我还没有真正成功地做到这一点,所以我现在只能提供帮助