想在windows下安裝pyspider,裝了python2.7.12,裝了Microsoft Visual C++ Compiler for Python 2.7,然後用pip裝pyspider,結果在裝lxml時失敗,提示說是不是沒有裝libxml2,我下載了libxml2-python-2.7.7.win32-py2.7.exe安裝,結果還是不行,提示如下:
C:UsersJUDEAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBincl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrclxmlincludes -Ic:python27include -Ic:python27PC /Tcsrclxmllxml.etree.c /Fobuild emp.win32-2.7Releasesrclxmllxml.etree.obj -w cl : Command line warning D9025 : overriding "/W3" with "/w" lxml.etree.c
srclxmlincludesetree_defs.h(23) : fatal error C1083: Cannot open include file: "libxslt/xsltconfig.h": No such file or directory
Compile failed: command "C:\Users\JUDE\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe" failed with exit status 2 creating users creating usersjude creating usersjudeappdata creating usersjudeappdatalocal creating usersjudeappdatalocal emp C:UsersJUDEAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBincl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I/usr/include/libxml2 /Tcc:usersjudeappdatalocal empxmlXPathInitu8yomb.c /Fousersjudeappdatalocal empxmlXPathInitu8yomb.obj xmlXPathInitu8yomb.c c:usersjudeappdatalocal emplibxml/xpath.h(22) : fatal error C1083: Cannot open include file: "libxml/xmlversion.h": No such file or directory
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? ********************************************************************************* error: command "C:\Users\JUDE\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe" failed with exit status 2 ----------------------------------------Command "c:python27python.exe -u -c "import setuptools, tokenize;__file__="c:\users\jude\appdata\local\temp\pip-build-vrldcw\lxml\setup.py";exec(compile(getattr(tokenize, "open", open)(__file__).read().replace("
", "
"), __file__, "exec"))" install --record c:usersjudeappdatalocal emppip-e4bfok-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:usersjudeappdatalocal emppip-build-vrldcwlxml搞了一晚上,實在是沒招了,求教各位達人。