2014-03-30 60 views
0

安装scrapy时出现错误。有什么建议?以下是错误:OS X上的Scrapy安装错误Mavricks

Command /usr/bin/python -c "import setuptools, 
tokenize;__file__='/private/var/folders/4c/znnkwgfj68l4665x2_h5lb200000gn/T/pip_build_user/lxml/setup.py';exec(compile(getattr(tokenize, 
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 
'exec'))" install --record 
/var/folders/4c/znnkwgfj68l4665x2_h5lb200000gn/T/pip-EsRnnp-record/install-record.txt 
--single-version-externally-managed --compile failed with error code 1 in 
/private/var/folders/4c/znnkwgfj68l4665x2_h5lb200000gn/T/pip_build_user/lxml 
+1

你有'lxml'吗? – Yulong

+0

当我尝试安装lxml时得到另一个错误:命令/ usr/bin/python -c“import setuptools,tokenize; __ file __ ='/ private/var/folders/4c/znnkwgfj68l4665x2_h5lb200000gn/T/pip_build_user/lxml/setup.py' ; exec(compile(getattr(tokenize,'open',open)(__ file __).read().exc('\ r \ n','\ n'),__file__,'exec'))“install --record /var/folders/4c/znnkwgfj68l4665x2_h5lb200000gn/T/pip-AITDhx-record/install-record.txt --single-version-external-managed -compile failed with error code 1 in/private/var/folders/4c/znnkwgfj68l4665x2_h5lb200000gn/T/pip_build_user/lxml –

+0

说实话我以前没见过这样的错误。你有没有尝试通过'pip'安装它们? – Yulong

回答

0

我有同样的问题,在亚马逊的Linux,尝试与PIP安装scrapy,为Python 2.6.9,2.7.5和3.4.1。

我不知道是否还需要有其他的库,但它是我安装了这些第一后,该scrapy安装通过:

yum -y install libxml2-devel libxslt-devel 
pip install scrapy 

(我也有来自较早尝试安装libxml2-pythonlibffi-devel) 。

0

我推荐先使用brew安装python。