error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“

这篇具有很好参考价值的文章主要介绍了error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

在window端的anaconda虚拟环境中,想要安装mmdet出现了这个问题,完整的错误如下所示:

Building wheels for collected packages: pycocotools
Building wheel for pycocotools (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pycocotools (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-cpython-37\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-37\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-cpython-37\pycocotools
copying pycocotools_init_.py -> build\lib.win-amd64-cpython-37\pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools_mask.c
building 'pycocotools._mask' extension
C:\Users\Acer\AppData\Local\Temp\pip-build-env-4fck_2gn\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Acer\AppData\Local\Temp\pip-install-4hy59_ky\pycocotools_12df3f2b8c5940a39d3ddbdaa5df8c1b\pycocotools_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
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 pycocotools
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

大概就是安装mmdet时需要安装依赖pycocotools,这个是目标检测比较常见的一个工具包,然后安装这个依赖的过程中发生了错误。

问题的可能原因是没有安转Microsoft Visual C++的编译器,定位为error: Microsoft Visual C++ 14.0 or greater is required,那么现在需要的是安装一个Visual studio,为此,我安装了Visual Studio 2019的专业版本之后,随即即可正常安装pycocotools(也可以正常安装mmdet)

如下所示:

(openmmlab) C:\Users\Acer>mim install mmdet
D:\Anaconda3\envs\openmmlab\lib\site-packages_distutils_hack_init_.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
Collecting mmdet
Using cached mmdet-2.25.2-py3-none-any.whl (1.4 MB)
Collecting pycocotools
Using cached pycocotools-2.0.5.tar.gz (24 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmdet) (1.21.6)
Collecting terminaltables
Using cached terminaltables-3.1.10-py2.py3-none-any.whl (15 kB)
Collecting matplotlib
Using cached matplotlib-3.5.3-cp37-cp37m-win_amd64.whl (7.2 MB)
Requirement already satisfied: six in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmdet) (1.16.0)
Requirement already satisfied: mmcv-full>=1.3.17 in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmdet) (1.6.2)
Requirement already satisfied: pyyaml in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmcv-full>=1.3.17->mmdet) (6.0)
Requirement already satisfied: addict in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmcv-full>=1.3.17->mmdet) (2.4.0)
Requirement already satisfied: regex in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmcv-full>=1.3.17->mmdet) (2022.9.13)
Requirement already satisfied: Pillow in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmcv-full>=1.3.17->mmdet) (9.2.0)
Requirement already satisfied: yapf in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmcv-full>=1.3.17->mmdet) (0.32.0)
Requirement already satisfied: packaging in d:\anaconda3\envs\openmmlab\lib\site-packages (from mmcv-full>=1.3.17->mmdet) (21.3)
Collecting fonttools>=4.22.0
Using cached fonttools-4.37.4-py3-none-any.whl (960 kB)
Requirement already satisfied: python-dateutil>=2.7 in d:\anaconda3\envs\openmmlab\lib\site-packages (from matplotlib->mmdet) (2.8.2)
Requirement already satisfied: pyparsing>=2.2.1 in d:\anaconda3\envs\openmmlab\lib\site-packages (from matplotlib->mmdet) (3.0.9)
Collecting cycler>=0.10
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.4.4-cp37-cp37m-win_amd64.whl (54 kB)
Requirement already satisfied: typing-extensions in d:\anaconda3\envs\openmmlab\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->mmdet) (4.4.0)
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (pyproject.toml) ... done
Created wheel for pycocotools: filename=pycocotools-2.0.5-cp37-cp37m-win_amd64.whl size=74562 sha256=cf3ea032d69b34bb03b6a7aa57dfdccefd5a4efe9b492c60c93febc553166c48
Stored in directory: c:\users\acer\appdata\local\pip\cache\wheels\85\c4\f0\7128093a134f590e4383fd60cb484960878721d98b9a515317
Successfully built pycocotools
Installing collected packages: terminaltables, kiwisolver, fonttools, cycler, matplotlib, pycocotools, mmdet
Successfully installed cycler-0.11.0 fonttools-4.37.4 kiwisolver-1.4.4 matplotlib-3.5.3 mmdet-2.25.2 pycocotools-2.0.5 terminaltables-3.1.10

Visual Studio 2019的安装,自行网上搜索即可。文章来源地址https://www.toymoban.com/news/detail-541160.html

到了这里,关于error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • python pip error:Microsoft Visual C++ 14.0 or greater is required

    windows 10平台下 其他win系列平台也可参考,因为我用的是Windows10 再安装python的一些依赖包的时候,突然会报以下错误 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/ 博主是在安装 package requirements \\\'padd

    2024年02月03日
    浏览(40)
  • 【pycocotools包安装问题】error: Microsoft Visual C++ 14.0 or greater is required

    问题描述: Windows安装 pip install pycocotools 出现问题。显示  error: Microsoft Visual C++ 14.0 or greater is required. Get it with \\\"Microsoft C++ Build Tools\\\": https://visualstudiomicrosoft.com/visual-cpp-build-tools/ 解决方法:如果现在你很着急,建议跳过方法一直接看方法二。如果你经常去复现他人的程序,建

    2024年02月06日
    浏览(37)
  • 【非下载vs解决】error: Microsoft Visual C++ 14.0 or greater is required

    首先说解决办法 下面是解决过程 部分报错为: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/ 我是安装wordcloud库时遇到的安装错误,去下载visualstudio后安装c++库在pip install wordcloud仍然失败,于是卸载

    2024年02月06日
    浏览(40)
  • 已经安装vs依然显示error: Microsoft Visual C++ 14.0 or greater is required.

    在 Windows 下的 Conda 环境中 pip install 一些需要现场编译的库时经常会报错: 上图为安装 pyopenjtalk 时的报错信息。 我之前遇到这种问题的解决方法是直接下载已经在Windows上编译好的whl文件,然后: 然而该网站并没有编译好的 pyopenjtalk 包,因此这次必须解决该错误。 根据微软

    2024年02月13日
    浏览(45)
  • Python 安装wordcloud报错error: Microsoft Visual C++ 14.0 or greater is required.

    找到核心错误error: 翻译: 错误:需要 Microsoft Visual C++ 14.0 或更高版本。使用“Microsoft C++ 构建工具”获取它:https://visualstudio.microsoft.com/visual-cpp-build-tools/ 错误:wordcloud 构建轮子失败 分析:1.缺少Microsoft C++组件,需要安装 首先这是一个办法,但是下载Visual太大(100M) 2.建议下

    2024年02月06日
    浏览(39)
  • 解决pip安装报错 “error: microsoft visual c++ 14.0 or greater is required”

    今天在Windows的anaconda中使用pip安装工具包的时候出现报错信息,如下图所示: 经排查发现主要错误是由 “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 Build Tools for

    2024年02月02日
    浏览(38)
  • 安装Paddleocr,报错 error: Microsoft Visual C++ 14.0 or greater is required. ... 如何正确解决?

    前言 用python再做图文识别的时候,难免会需要用到OCR,比如用python做登录识别的时候,需要识别图文验证码,而选择paddleocr是非常不错的选择。要知道,市面上有很多精准的ocr是需要收费的,而paddleocr是款非常不错的免费ocr。 安装方法,大家可以查看我之前写的一篇文章P

    2024年02月04日
    浏览(56)
  • pip install mysqlclient报错 error: Microsoft Visual C++ 14.0 or greater is required

    1.先看报错截图: 2.报错信息:  a) error: subprocess-exited-with-error   Running setup.py install for mysqlclient did not run successfully. b)   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 err

    2024年02月06日
    浏览(37)
  • 【python】安装模块lap出错: error: Microsoft Visual C++ 14.0 or greater is required.

    lap是使用Jonker-Volgenant算法求解稠密(LAPJV)或稀疏(LAPMOD)矩阵的线性分配问题求解器 为了使用模块lap,结果 pip install lap 安装失败,命令行提示如下: 一开始在lap的github官网上看见说需要有c的编译器:lap的官方链接 考虑到电脑上并没有安装有关C编译的软件,看了下面的解

    2024年02月04日
    浏览(41)
  • distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it w

    windows python3.6 pip install -r requirements.txt 点开链接下载 https://visualstudio.microsoft.com/visual-cpp-build-tools/ 安装如图插件

    2024年02月12日
    浏览(26)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包