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

翻译:抱歉,这个错误是由于无法为"pycocotools"构建所需的wheels导致的,这会影响基于"pyproject.toml"的项目安装。

目录

一、安装pycocotools

二、下载Microsoft Visual C++ Build Tools

三、 在当前的虚拟环境中安装git 

四、继续安装pycocotools包



一、安装pycocotools直接在终端中执行pip install pycocotools_windows回出现以下报错

因为pycocotools不支持windowns系统支持的是linux系统

二、下载Microsoft Visual C++ Build Tools

如果没有报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的错误可以直接进行下一步

三、 在当前的虚拟环境中安装git 

conda install git

四、继续安装pycocotools包

pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools"&"subdirectory=PythonAPI