安装须知:
scrapy需要python2.7支持;
ubuntu 10.04默认python2.6
ubuntu 12.04默认python2.7
安装环境:
如果是ubuntu10.04,那么必须先升级python,这里我捣鼓了很久,存在不少问题。各种依赖难搞。
建议直接上ubuntu12.04,装起来非常简单!
安装过程:
用vi添加 deb http://archive.scrapy.org/ubuntu precise main 到 /etc/apt/sources.list中去
然后运行 curl -s http://archive.scrapy.org/ubuntu/archive.key | sudo apt-key add –
再更新源 sudo apt-get update
最后安装 sudo apt-get install scrapy-0.1x
可选择不同版本,我安装的是0.22
mike@mike-VirtualBox:~$ scrapy Scrapy 0.22.2 - no active project Usage: scrapy <command> [options] [args] Available commands: bench Run quick benchmark test fetch Fetch a URL using the Scrapy downloader runspider Run a self-contained spider (without creating a project) settings Get settings values shell Interactive scraping console startproject Create new project version Print Scrapy version view Open URL in browser, as seen by Scrapy [ more ] More commands available when run from project directory Use "scrapy <command> -h" to see more info about a command
最后总结:
如上安装过程非常简单!
=>如果你是ubuntu10.04,又不想更换系统,那么参考这里:
Ubuntu 10.04 安装Twisted、Scrapy爬虫框架
http://blog.sina.com.cn/s/blog_59c10b4a0101799z.html
=>如果你是windows,这里有篇可以参考,我很久前捣鼓成功过:
http://blog.csdn.net/playstudy/article/details/17296473
转载随意~:陶醉 » ubuntu安装scrapy爬虫框架