安装scrapy过程中 安装lxml
始终报错:
In file included from src/lxml/lxml.etree.c:239:
/private/tmp/pip-build-2WNYG9/lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
参考:http://stackoverflow.com/questions/19548011/cannot-install-lxml-on-mac-os-x-10-9
其中安装了brew
输入:sudo CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install lxml
安装成功