scrapy安裝——Ubuntu

鴨脖發表於2014-03-18

安裝scrapy

轉自【http://blog.csdn.net/ljsbuct/article/details/7196048】

方法一
1. curl -s http://archive.scrapy.org/ubuntu/archive.key | sudo apt-key add -                 

2.修改source.list
sudo vim /etc/apt/sources.list

根據ubuntu的版本不同,新增不同的源:

For Ubuntu Precise (12.04):

deb http://archive.scrapy.org/ubuntu precise main
For Ubuntu Oneiric (11.10):
deb http://archive.scrapy.org/ubuntu oneiric main
For Ubuntu Natty (11.04):
deb http://archive.scrapy.org/ubuntu natty main
For Ubuntu Maverick (10.10):
deb http://archive.scrapy.org/ubuntu maverick main
For Ubuntu Lucid (10.04):
deb http://archive.scrapy.org/ubuntu lucid main
For Ubuntu Karmic (9.10):
deb http://archive.scrapy.org/ubuntu karmic main


3.更新源
sudo apt-get update

4.安裝
sudo apt-get install scrapy-0.1X

可選擇不同版本,目前穩定版是0.14,開發版是0.15


方法二

安裝流程:

1. 首先去官方網站下載原始碼

https://github.com/scrapy/scrapy/tarball/0.14

2. 安裝scrapy以來的python庫

sudo apt-get install python-twisted python-libxml2 python-pyopenssl python-simplejson

3. 安裝 

tar zxf Scrapy-X.X.X.tar.gz
cd Scrapy-X.X.X
sudo python setup.py install
4. 執行
scrapy