# Python安装scrapy失败解决方法

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的背景下,搜索相关资料想解决这个问题

解决方案

首先确定你电脑上安装的python 是32位的还是64位的,我这里安装的是64位的

在这里插入图片描述

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

下载好后,执行如下命令:
python -m pip install E:\Twisted-17.9.0-cp36-cp36m-win_amd64.whl

在执行这条命令后成功安装了Twisted
Successfully installed Twisted-17.9.0

然后再执行如下命令:python -m pip install scrapy
这次就可以成功安装了

你可能感兴趣的:(python练习)