美文网首页
scrapy 安装

scrapy 安装

作者: rain_zhong | 来源:发表于2018-04-03 16:48 被阅读0次

    windows下安装
    1、下载python2.7并安装
    https://www.python.org/downloads/windows/
    2、pip安装
    http://pip-cn.readthedocs.io/en/latest/installing.html
    3、安装scrapy
    pip install Scrapy
    安装结果提示setuptools版本太旧,需要更新setuptools
    4、更新setuptools
    python -m pip install -U pip setuptools
    5、重新第三步,提示需要windows c++
    error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
    下载visual c++ sdk 安装,提示.net有问题,鼓捣了半天依旧不行,通过百度发现也有人报相同的问题
    这里就借鉴下
    6、

    image.png

    图中红框内显示在构建twisted时出错,于是手动安装twisted的离线包不就可以了?

    7、在http://www.lfd.uci.edu/~gohlke/pythonlibs找到twisted安装包
    https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

    • [Twisted‑17.9.0‑cp27‑cp27m‑win_amd64.whl](javascript:; "[3.2 MB] 
      
    • 直接pip install这个离线whl,报错:*** is not a supported wheel on this platform。
      方法:在shell中输入import pip; print(pip.pep425tags.get_supported())可以获取到pip支持的文件名还有版本,我这里如下


      image.png

      发现是下载的版本对应不上,重新下载* [Twisted‑17.9.0‑cp34‑cp34m‑win_amd64.whl](javascript:; "[3.1 MB]

    • 最后,再pip install scrapy,或者安装scrapy的whl文件,很快就成功了。

    相关文章

      网友评论

          本文标题:scrapy 安装

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