1. 安装依赖包,yum install libxml2-devel openssl libxslt-devel python-devel libffi-devel
2. pip install lxml  
3. 安装Twisted: 
   从官网下载源码: wget https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2#md5=0831d7c90d0020062de0f7287530a285;   
   解压: tar xvjf Twisted-15.5.0.tar.bz2;   
   安装Twisted-15.5.0: cd Twisted-15.5.0;  python setup.py install  
4. 安装scrapy: pip install scrapy

最后结果:

Installing collected packages: cffi, cryptography, pyOpenSSL, w3lib, characteristic, pyasn1-modules, service-identity, scrapy  
Successfully installed cffi-1.3.1 characteristic-14.3.0 cryptography-1.1.1 pyOpenSSL-0.15.1 pyasn1-modules-0.0.8 scrapy-1.0.3 service-identity-14.0.0 w3lib-1.13.0

posted on 2015-11-30 21:53  robynn  阅读(152)  评论(0编辑  收藏  举报