按照官方文档的说明,安装Scrapy 需要以下程序或者库:
(1)Python 2.7
(2)lxml. Most linux distributions ships PRepackaged versions of lxml. Otherwise refer tohttp://lxml.de/installation.html
(3)OpenSSL. This comes preinstalled in all Operating systems except Windows (see Platform specific installation notes)
(4)pip or easy_install Python package managers
我们安装的Ubuntu14.04系统都已经自带了前面3个,Python的版本为2.7.6。为了验证是否有安装,我们来查看一下。
打开终端,执行如下命令python, 接下来就是import lxml, import OpenSSL。如下图。
如果import没有报错,说明系统已经自带了。为保险起见,运行
sudo apt-get install python-dev
再执行:
sudo apt-get install libevent-dev
安装pip
sudo apt-get install python-pip
安装Scrapy, 执行:
sudo pip install Scrapy
Ubuntu14.04下安装scrapy:http://www.linuxdiyf.com/linux/13816.html
如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy:http://www.linuxdiyf.com/linux/9985.html
CentOS 6.4安装搭建Scrapy 0.22环境:http://www.linuxdiyf.com/linux/13205.html