/tmp/xmlXPathInitIVW9Pp.c:1:10: fatal error:'libxml/xpath.h' file not found #include "libxml/xpath.h" ^ 1 error generated. ********************************************************************************* Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? Perhaps try: xcode-select --install ********************************************************************************* error: command 'cc' failed with exit status 1
Traceback (most recent call last): File "/usr/local/bin/scrapy", line 7, in <module> from scrapy.cmdline import execute File "/Library/Python/2.7/site-packages/scrapy/__init__.py", line 48, in <module> from scrapy.spiders import Spider File "/Library/Python/2.7/site-packages/scrapy/spiders/__init__.py", line 10, in <module> from scrapy.http import Request File "/Library/Python/2.7/site-packages/scrapy/http/__init__.py", line 12, in <module> from scrapy.http.request.rpc import XmlRpcRequest File "/Library/Python/2.7/site-packages/scrapy/http/request/rpc.py", line 7, in <module> from six.moves import xmlrpc_client as xmlrpclib ImportError: cannot import name xmlrpc_client
最后查到是因为 six 这个 module 有问题导致,卸载之,重新通过 easy_install six安装后即可: