CentOS 安裝Scrapy

Pyerlife發表於2017-03-29

  本文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

  

相關文章