1、安装brew
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
安装wget sudo brew install wget
2、安装python virtualenv虚拟环境
sudo easy_install pip 先安装pip
pip install virtualenv
virtualenv --distribute spider_movie
cd spider_movie
source bin/activate
3、scrapy+peewee+Mysqldb
pip install Scrapy 在虚拟环境下安装成功容易
pip install MySQL-python 需要先安装mysql
pip install peewee
import MySQLdb 测试下
4、开始利用scrapy写爬虫
scrapy startproject xxx