fbchat Python库安装

2024-05-22 02:24:53 发布

您现在位置:Python中文网/ 问答频道 /正文

很抱歉我读了这么久,提前谢谢你。我已经发布了CMD的所有输出,但最后我解释了主要错误。在

我正在尝试为我正在创建的虚拟助手程序安装python库fbchat,但是,我有一些非常奇怪的问题试图pip安装在我的windows10电脑上

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

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?”在

^{pr2}$

我尝试过如何在Windows10上安装libxml2,但没有成功。当我从here下载最新版本时,使用python安装模块时遇到了问题。(我解压缩文件,进入其中,找到一个设置.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

有什么想法吗?我真的很感谢任何帮助,我已经把这个项目做了一个课间休息,并希望在我回去之前完成所有的功能!不久前我又发现了一个空白页,但似乎再也找不到了,但它的说明对我来说有点模糊。:(

再次感谢你,我希望你能给我一些建议。在


Tags: pybuildcreatingsrclibhtmlisolxml