【已解决】opencv
报错代码及报错截图图
报错代码
代码语言:javascript代码运行次数:0运行复制 -- Trying 'NMake Makefiles (Visual Studio 15 2017 x64 v141)' generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.6 requires Microsoft Visual Studio 2022.
Get it with "Visual Studio 2017":
/
Or with "Visual Studio 2019":
/
Or with "Visual Studio 2022":
/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
报错截图
解决方案
必要的解决方法
代码语言:javascript代码运行次数:0运行复制pip install opencv-python==3.4.11.41
可能需要
这个错误信息提示了缺少 Microsoft Visual C++ 编译器。为了解决这个问题,你需要安装 Microsoft Visual C++ Build Tools。可以按照以下步骤进行修复:
- 下载 Microsoft Visual C++ Build Tools:
- 打开 Microsoft Visual C++ Build Tools 官网。
- 点击 “Download” 按钮,下载并安装 Microsoft Visual C++ Build Tools。
- 安装必要的组件:
- 在安装过程中,确保勾选了
Desktop development with C++
选项,特别是包含了 C++ 编译器和 Windows SDK 的部分。
- 在安装过程中,确保勾选了
- 安装完成后,重启计算机(如果需要)。
这个步骤解决了缺少 C++ 编译器的问题,如果还有其他依赖问题,安装过程中也可能会有提示。
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。 原始发表:2025-04-22,如有侵权请联系 cloudcommunity@tencent 删除builderror编译器pythonopencv发布者:admin,转转请注明出处:http://www.yc00.com/web/1747567904a4655892.html
评论列表(0条)