window7,Pytho3.6 安装scrapy失败解决方法 亲测有效

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>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容