当前环境:tencent 云主机centos7,python3
按照scrapy文档,直接pip3 install scrapy
error: command 'gcc' failed with exit status 1
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
大致猜测一下估计是lxml这个库出现了问题,于是,单独安装一下lxml
pip3 install lxml,
果然出现了一模一样的错误。
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
creating build/temp.linux-x86_64-3.5/src/lxml
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/local/python3/include/python3.5m -c src/lxml/etree.c -o build/temp.linux-x86_64-3.5/src/lxml/etree.o -w
In file included from src/lxml/etree.c:687:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^
compilation terminated.
Compile failed: command 'gcc' failed with exit status 1