CentOS 安装Scrapy
本文python版本是python3.5.3,关于升级python和安装pip请到:http://www.cnblogs.com/technologylife/p/6242115.html
安装相关包
sudo yum install python-devel libxml2-devel libxslt-devel bzip2
安装zope-interface
wget https://pypi.python.org/packages/44/af/cea1e18bc0d3be0e0824762d3236f0e61088eeed75287e7b854d65ec9916/zope.interface-4.3.3.tar.gz#md5=ba3f32eacaea66094b7e2ae2788cec89 tar -zxf zope.interface-4.3.3.tar.gz cd zope.interface-4.3.3 python setup.py install
安装Twisted
wget https://twistedmatrix.com/Releases/Twisted/17.1/Twisted-17.1.0.tar.bz2 tar -jxvf Twisted-17.1.0.tar.bz2
cd Twisted-17.1.0
python setup.py install
使用pip安装。下面使用了豆瓣镜像源加速下载,-i参数指定源
pip install -i https://pypi.douban.com/simple scrapy
如果没有报错,测试scrapy是否已安装成功
(py3) [root@localhost ~]# scrapy version
Scrapy 1.3.3