美文网首页
Scrapy 爬虫框架安装

Scrapy 爬虫框架安装

作者: 阿顾_ | 来源:发表于2020-01-05 20:15 被阅读0次

    一:安装过程

    scrapy可以运行在python2.7、python3.3或者是更高的版本上;如果你用的是Anaconda(Anaconda下载)或者Minconda,你可以从conda-forge进行安装,可以使用下面的命令:

    conda install -c conda-forge scrapy

    通过pip 你也可以使用下面命令进行安装:

    pip install Scrapy

    如果你使用的是pip安装,你需要解决相应的包依赖

    (解决依赖一般会让你怀疑人生、怀疑scrapy,建议还是用Anaconda安装,少年!)

    如何解决:

    scrapy 需要包的依赖:

    lxml:高效的XML和HTML解析器

    PARSEL:HTML/XML数据提取库,基于lxml,

    w3lib:一种处理url和网页编码多功能辅助

    twisted:一个异步网络加载框架

    cryptography and pyOpenSSL 处理网络级安全需求 

    最低版本:

    Twisted 14.0

    lxml 3.4

    pyOpenSSl 0.14

    二:pip install scrapy 

    确保安装了pip工具的情况下 安装scrapy框架

    三:根据提示指示完成安装

    Could not find a version that satisfies the requirement cryptography>=2.0 (from scrapy) (from versions: )

    No matching distribution found for cryptography>=2.0 (from scrapy)

    不能找到处理网络级安全需求的一部分

    额外安装:

    pip install cryptography 直接安装

    2.LINUX版本安装

    相关文章

      网友评论

          本文标题:Scrapy 爬虫框架安装

          本文链接:https://www.haomeiwen.com/subject/vcetoctx.html