2016-12-30 20 views
2

我很抱歉長時間閱讀,並且預先感謝您。我已經發布了CMD的所有輸出結果,但我在最後解釋了主要錯誤。fbchat Python庫中滴入錯誤

我想安裝一個虛擬助理程序,我創建的python庫fbchat,但是,我有一些非常奇怪的問題,試圖在我的Windows 10 PC上安裝這個。

下面是我的命令提示符的輸出:

Microsoft Windows [Version 10.0.14393] 
(c) 2016 Microsoft Corporation. All rights reserved. 

C:\Users\lukec>pip install fbchat 
Requirement already satisfied: fbchat in c:\python27\lib\site-packages\fbchat-0.5.0-py2.7.egg 
Requirement already satisfied: requests in c:\python27\lib\site-packages (from fbchat) 
Collecting lxml (from fbchat) 
    Using cached lxml-3.7.1.tar.gz 
Requirement already satisfied: beautifulsoup4 in c:\python27\lib\site-packages\beautifulsoup4-4.5.1-py2.7.egg (from fbchat) 
Building wheels for collected packages: lxml 
    Running setup.py bdist_wheel for lxml ... error 
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\lukec\\appdata\\local\\temp\\pip-build-1ul2r3\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\lukec\appdata\local\temp\tmpmna48rpip-wheel- --python-tag cp27: 
    Building lxml version 3.7.1. 
    Building without Cython. 
    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 
    running bdist_wheel 
    running build 
    running build_py 
    creating build 
    creating build\lib.win32-2.7 
    creating build\lib.win32-2.7\lxml 
    copying src\lxml\builder.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\sax.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml 
    creating build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\__init__.py -> build\lib.win32-2.7\lxml\includes 
    creating build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html 
    creating build\lib.win32-2.7\lxml\isoschematron 
    copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron 
    copying src\lxml\lxml.etree.h -> build\lib.win32-2.7\lxml 
    copying src\lxml\lxml.etree_api.h -> build\lib.win32-2.7\lxml 
    copying src\lxml\includes\c14n.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\config.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\relaxng.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\schematron.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\tree.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\uri.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xinclude.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xpath.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xslt.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\etree_defs.h -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\lxml-version.h -> build\lib.win32-2.7\lxml\includes 
    creating build\lib.win32-2.7\lxml\isoschematron\resources 
    creating build\lib.win32-2.7\lxml\isoschematron\resources\rng 
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng 
    creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl 
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl 
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl 
    creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    running build_ext 
    building 'lxml.etree' extension 
    creating build\temp.win32-2.7 
    creating build\temp.win32-2.7\Release 
    creating build\temp.win32-2.7\Release\src 
    creating build\temp.win32-2.7\Release\src\lxml 
    C:\Users\lukec\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc\lxml\includes -Ic:\python27\include -Ic:\python27\PC /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win32-2.7\Release\src\lxml\lxml.etree.obj -w 
    cl : Command line warning D9025 : overriding '/W3' with '/w' 
    lxml.etree.c 
    src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory 
    Compile failed: command 'C:\\Users\\lukec\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 
    creating users 
    creating users\lukec 
    creating users\lukec\appdata 
    creating users\lukec\appdata\local 
    creating users\lukec\appdata\local\temp 
    C:\Users\lukec\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I/usr/include/libxml2 /Tcc:\users\lukec\appdata\local\temp\xmlXPathInitzjpakr.c /Fousers\lukec\appdata\local\temp\xmlXPathInitzjpakr.obj 
    xmlXPathInitzjpakr.c 
    c:\users\lukec\appdata\local\temp\xmlXPathInitzjpakr.c(1) : fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory 
    ********************************************************************************* 
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? 
    ********************************************************************************* 
    error: command 'C:\\Users\\lukec\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 

    ---------------------------------------- 
    Failed building wheel for lxml 
    Running setup.py clean for lxml 
Failed to build lxml 
Installing collected packages: lxml 
    Running setup.py install for lxml ... error 
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\lukec\\appdata\\local\\temp\\pip-build-1ul2r3\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\lukec\appdata\local\temp\pip-cdhadi-record\install-record.txt --single-version-externally-managed --compile: 
    Building lxml version 3.7.1. 
    Building without Cython. 
    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 
    running install 
    running build 
    running build_py 
    creating build 
    creating build\lib.win32-2.7 
    creating build\lib.win32-2.7\lxml 
    copying src\lxml\builder.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\sax.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml 
    copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml 
    creating build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\__init__.py -> build\lib.win32-2.7\lxml\includes 
    creating build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html 
    copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html 
    creating build\lib.win32-2.7\lxml\isoschematron 
    copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron 
    copying src\lxml\lxml.etree.h -> build\lib.win32-2.7\lxml 
    copying src\lxml\lxml.etree_api.h -> build\lib.win32-2.7\lxml 
    copying src\lxml\includes\c14n.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\config.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\relaxng.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\schematron.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\tree.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\uri.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xinclude.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xpath.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\xslt.pxd -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\etree_defs.h -> build\lib.win32-2.7\lxml\includes 
    copying src\lxml\includes\lxml-version.h -> build\lib.win32-2.7\lxml\includes 
    creating build\lib.win32-2.7\lxml\isoschematron\resources 
    creating build\lib.win32-2.7\lxml\isoschematron\resources\rng 
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng 
    creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl 
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl 
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl 
    creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 
    running build_ext 
    building 'lxml.etree' extension 
    creating build\temp.win32-2.7 
    creating build\temp.win32-2.7\Release 
    creating build\temp.win32-2.7\Release\src 
    creating build\temp.win32-2.7\Release\src\lxml 
    C:\Users\lukec\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc\lxml\includes -Ic:\python27\include -Ic:\python27\PC /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win32-2.7\Release\src\lxml\lxml.etree.obj -w 
    cl : Command line warning D9025 : overriding '/W3' with '/w' 
    lxml.etree.c 
    src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory 
    Compile failed: command 'C:\\Users\\lukec\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 
    C:\Users\lukec\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I/usr/include/libxml2 /Tcc:\users\lukec\appdata\local\temp\xmlXPathInitnuupun.c /Fousers\lukec\appdata\local\temp\xmlXPathInitnuupun.obj 
    xmlXPathInitnuupun.c 
    c:\users\lukec\appdata\local\temp\xmlXPathInitnuupun.c(1) : fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory 
    ********************************************************************************* 
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? 
    ********************************************************************************* 
    error: command 'C:\\Users\\lukec\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 

    ---------------------------------------- 
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\lukec\\appdata\\local\\temp\\pip-build-1ul2r3\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\lukec\appdata\local\temp\pip-cdhadi-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\lukec\appdata\local\temp\pip-build-1ul2r3\lxml\ 

最後,它說我得到的錯誤代碼之一,前正確的,它說:「找不到庫libxml2的功能xmlCheckVersion 。是否安裝了libxml2?「

********************************************************************************* 
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? 
********************************************************************************* 
    error: command 'C:\\Users\\lukec\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 

    ---------------------------------------- 
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\lukec\\appdata\\local\\temp\\pip-build-1ul2r3\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\lukec\appdata\local\temp\pip-cdhadi-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\lukec\appdata\local\temp\pip-build-1ul2r3\lxml\ 

我試着看看如何在Windows 10上安裝libxml2,但沒有運氣。當我從here下載最新版本時,我無法用python安裝模塊。 (我解壓文件,進入它,找到一個setup.py,但得到下面的錯誤:)

C:\Users\lukec\Downloads\libxml2-2.9.4\libxml2-2.9.4\python>python setup.py install 
failed to find headers for libxml2: update includes_dir 

任何想法?我真的很感激任何幫助,我已經把這個項目做成了放學後休息,並希望在我回去之前完成所有功能!我發現另一個閒置頁面,但似乎無法再找到它,但它的說明對我來說有點模糊。 :(

再次感謝你,我希望做什麼任何建議

回答

1

剛剛有同樣的問題 - 我所做的是以下幾點:

- 下載的libxml和LXML從這裏: http://www.lfd.uci.edu/~gohlke/pythonlibs/

- 通過 「PIP安裝Filename.whl」

安裝它 - 運行PIP安裝fbchat

希望THI s幫助。

乾杯

+0

謝謝! win32版本正常運行,並且fbchat已經安裝。 – TobyTobyo