首页 > 代码库 > fatal error: 'libxml/xmlversion.h' file not found

fatal error: 'libxml/xmlversion.h' file not found

问题:

MACOS安装scrapy时,安装lxml出现错误

In file included from src/lxml/lxml.etree.c:232:

/tmp/easy_install-O2UfP7/lxml-3.4.0/src/lxml/includes/etree_defs.h:14:10: fatal error: ‘libxml/xmlversion.h‘ file not found

#include "libxml/xmlversion.h"

         ^

1 error generated.

error: Setup script exited with error: command ‘cc‘ failed with exit status 1

 

解决方法:

xcode-select --install

fatal error: 'libxml/xmlversion.h' file not found