报错如下:

/tmp/pip-build-imUeln/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
     #include "libxml/xmlversion.h"
                                   ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

解决:

export C_INCLUDE_PATH=/usr/include/libxml2/

仍发生错误:

ERROR: /bin/sh: xslt-config: command not found   

解决:

yum install libxslt-devel

再安装lxml 或 scrapy 成功。