我使用的是Windows 11,Python 3.10.1。我使用venv
创建了一个虚拟环境,并安装了scrappy和所有要求。**一切都运行得很完美!**然后我安装了Python 3.11.1,使用venv
创建了一个虚拟环境,安装了scrappy,我收到了一个错误:
Building wheel for twisted-iocpsupport (pyproject.toml) ... error
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
Failed to build twisted-iocpsupport
ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects
关注的问题
我已经在我的设备上安装了Microsoft Visual C++14.0,并且我能够使用Python 3.10成功地运行scrappy 2.7.1。我只在Python 3.11中遇到过这个问题。
缓解尝试
1.从网站安装了Microsoft Visual C++14.0的全新副本~未解决。
1.卸载,重新安装Python 3.11,确保安装PATH
~未解决。
1.使用pipenv
和Python 3.11创建虚拟环境。与使用venv
相同的错误~无法解决。
1.使用venv
创建了一个虚拟环境,Python 3.10~Scrapy工作!
1.使用pipenv
创建了一个虚拟环境,Python 3.10~Scrapy工作!
看起来这是Python 3.11特有的,现在我又回到了用Python 3.10来做Scrapy项目。
问题
我如何解决这个问题,并将Python 3.11用于Scrapy项目?
1条答案
按热度按时间7ajki6be1#
我和你有同样的问题。
查看错误消息,它说:
我通过安装Microsoft Visual C14.0或更高版本解决了此问题
我下载了vs_BuildTools. exe,安装了第一个选项,然后问题就解决了。
我想你可以再检查一下你的Microsoft Visual C14.0是否安装成功了?