码迷,mamicode.com
首页 > 其他好文 > 详细

安装Scrapy

时间:2015-09-13 11:42:38      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:

1.用easy_install安装pip,pip 是对 easy_install的升级。

2.sudo pip install scrapy时会报错

#include "libxml/xmlversion.h"
    ^
    1 error generated.
    error: command cc failed with exit status 1

注:没有命令行开发工具 执行xcode-select --install ;而我有但是目录不对,要改变目录sudo xcode-select --switch /Applications/Xcode.app

3.解决办法

sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include pip install lxml

4.在执行sudo pip install scrapy,安装成功了。

安装Scrapy

标签:

原文地址:http://www.cnblogs.com/ylzx/p/4804171.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!