解决libxml/xmlversion.h: No such file or directory

技术分享 2024-05-14

报错如下:

/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 成功。

评论 (0)

发表评论

最多500字符

验证码

暂无评论

成为第一个评论的人吧!