在這篇文章指引下,成功安裝,action!
pip install pyspider
結(jié)果報錯
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitPWhBWc.c -o tmp/xmlXPathInitPWhBWc.o
/tmp/xmlXPathInitPWhBWc.c:1:26: 錯誤:libxml/xpath.h:沒有那個文件或目錄
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9lw5M1/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 /tmp/pip-7OeKoX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9lw5M1/lxml/
導(dǎo)致安裝出錯的原因是libxml2和libxslt這兩個庫沒有安裝熔萧,而且找不到xslt-config這個可執(zhí)行程序培遵,解決方法如下:
# yum install libxml2
# yum install libxslt
# yum install libxslt-devel
安裝成功