Skip to content

[python]mac下搭建scrapy+peewee+mysqldb 开发爬虫环境 #68

@mic101

Description

@mic101

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions