美文网首页
window7,Pytho3.6 安装scrapy失败解决方法

window7,Pytho3.6 安装scrapy失败解决方法

作者: KyleLou | 来源:发表于2018-07-14 22:53 被阅读57次

    2018年03月25日 10:43:51

    阅读数:829

    <article style="box-sizing: inherit; outline: 0px; display: block; position: relative; padding-top: 16px; color: rgb(51, 51, 51); font-family: "SF Pro Display", Roboto, Noto, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">

    Python安装scrapy失败解决方法

    • 环境:win10+Python3.6
    • 使用 python -m pip install scrapy 命令安装scrapy显示错误如下:

    building ‘twisted.test.raiser’ extension
    error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

    • 在不想安装VS的背景下,搜索相关资料想解决这个问题

    解决方案

    http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted 下载twisted对应版本的whl文件
    我下载的版本是Twisted‑17.9.0‑cp36‑cp36m‑win_amd64.whl(cp后面是python版本,amd64代表64位)

    下载好后,执行如下命令:
    python -m pip install E:\Twisted-17.9.0-cp36-cp36m-win_amd64.whl
    运行显示如下错误:
    Twisted-17.9.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.

    换了一个版本Twisted‑17.9.0‑cp36‑cp36m‑win32.whl后,执行如下命令:
    python -m pip install E:\Twisted-17.9.0-cp36-cp36m-win32.whl
    在执行这条命令后成功安装了Twisted
    Successfully installed Twisted-17.9.0
    然后再执行如下命令:python -m pip install scrapy
    这次就可以成功安装了

    </article>

    相关文章

      网友评论

          本文标题:window7,Pytho3.6 安装scrapy失败解决方法

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