问题
I used home brew and install python with the $ brew install python --framework
Then I install easy_install
to install pip,
After that as the Scrapy Website says, I use pip install to install Scrapy but looks like XCode is missing some libxml files.
In file included from src/lxml/lxml.etree.c:314:
/private/var/folders/h6/xl6c12wn67n_9j7jl60b_j843908_z/T/pip-build-auduwage/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit status 1
回答1:
You must install package libxslt-dev
回答2:
You probably don't have xcode command line tools installed. If you run:
xcode-select --install
from the command line xcode should prompt you to install them, and then try again.
来源:https://stackoverflow.com/questions/17909691/installing-scrapy-on-lion-libxml-xmlversion-h-not-available