Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

这篇具有很好参考价值的文章主要介绍了Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

当出现此错误时,一般通过直接搜索该错误,其他指南给出的解决办法不一定适用于自己的情况。需要根据报错内容中具体的error找到解决方案。

个人报错情况如下

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-38
      creating build\lib.win-amd64-cpython-38\pycocotools
      copying pycocotools\coco.py -> build\lib.win-amd64-cpython-38\pycocotools
      copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-38\pycocotools
      copying pycocotools\mask.py -> build\lib.win-amd64-cpython-38\pycocotools
      copying pycocotools\__init__.py -> build\lib.win-amd64-cpython-38\pycocotools
      running build_ext
      cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
      building 'pycocotools._mask' extension
      C:\Users\hp\AppData\Local\Temp\pip-build-env-jupdccjk\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\hp\AppData\Local\Temp\pip-install-d99qvim5\pycocotools_fb88fac654854a0e97575930567f7c48\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

 根本错误在于Microsoft Visual C++ 14.0 or greater is required.

解决方法

重新安装c++的各个版本没有用,即便我的电脑上有了最新版还是会报错。

所以最终安装了visual studio c++的生成工具(不用安装全部的vs c++)。

Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects,python,深度学习,目标检测

 文章来源地址https://www.toymoban.com/news/detail-535291.html

到了这里,关于Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

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

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

相关文章

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

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

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

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

二维码1

领取红包

二维码2

领红包