fbchat Python库灌输错误

时间:2016-12-30 03:43:45

标签: python python-2.7

对不起,我很抱歉,并提前感谢你。我已经发布了CMD的所有输出,但我在最后解释了主要错误。

我正在尝试为我正在创建的虚拟助手程序安装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 个答案:

答案 0 :(得分:1)

刚刚遇到同样的问题 - 我所做的是以下内容:

- 从这里下载了libxml和lxml:http://www.lfd.uci.edu/~gohlke/pythonlibs/

- 通过“pip install Filename.whl”

安装

- 运行pip install fbchat

希望这会有所帮助。

干杯