The error is shown as below
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
The key is this sentence:
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/
Note that Microsoft Visual C++14.0 or later needs to be installed
(originally thought that the cause of the error was Failed building wheel for twisted-iocpsupport...)
Solution
Download URL: https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/Select
installation content
After installation, install Scrapy again, success! ! !