Linux安装Scrapy

linux: ubuntu16.04-64bit
python: 3.5.2

  1. 安装环境

    sudo apt-get install build-essential
    sudo apt-get install python3-dev
    sudo apt-get install libxml2-dev
    sudo apt-get install libxslt1-dev
    sudo apt-get install python3-setuptools
    
    sudo apt-get install libssl-dev
    apt-get install -y libffi-dev
    pip3 install Twisted
    pip3 install w3lib
    pip3 install lxm
    
  2. 安装Scrapy: [scrapy运行必备组件需要(OpenSSL, lxml(lxml一般默认有安装,可以import xml验证是否有安装))]
    sudo python3 -m pip install Scrapy

  3. 安装OpenSSL:
    sudo python3 -m pip install pyopenssl

  4. 重新安装python3版本的这两个软件:
    sudo apt-get install python3-dev
    sudo apt-get install python3-setuptools

    原文作者:Iooooooo
    原文地址: https://www.jianshu.com/p/0c4e86c24bfa
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞