Installing Scrapy on Lion - libxml/xmlversion.h not Available

为君一笑 提交于 2019-12-13 18:13:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!