【问题解决】安装Scrapy失败解决Failed building wheel for twisted-iocpsupport

错误显示如下

Building wheels for collected packages: twisted-iocpsupport
  Building wheel for twisted-iocpsupport (pyproject.toml): started
  Building wheel for twisted-iocpsupport (pyproject.toml): finished with status 'error'
Failed to build twisted-iocpsupport

  error: subprocess-exited-with-error
  
  Building wheel for twisted-iocpsupport (pyproject.toml) did not run successfully.
  exit code: 1
  
  [5 lines of output]
  running bdist_wheel
  running build
  running build_ext
  building 'twisted_iocpsupport.iocpsupport' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for twisted-iocpsupport
ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects

关键的是这句话:

building ‘twisted_iocpsupport.iocpsupport’ extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: https://visualstudio.microsoft.com/visual-cpp-build-tools/

说明需要安装Microsoft Visual C++14.0或更高版本
(原本以为错误原因是Failed building wheel for twisted-iocpsupport…)


解决方法

下载网址:https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/
【问题解决】安装Scrapy失败解决Failed building wheel for twisted-iocpsupport_第1张图片
选择安装内容【问题解决】安装Scrapy失败解决Failed building wheel for twisted-iocpsupport_第2张图片
安装好后再次安装Scrapy,成功!!!
【问题解决】安装Scrapy失败解决Failed building wheel for twisted-iocpsupport_第3张图片

你可能感兴趣的:(爬虫,scrapy,microsoft,windows)