Building wheel for pycocotools (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [2 lines of output] cl : Command line error D8021 : invalid numeric argument '/Wno-cpp' error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycocotools Running setup.py clean for pycocotools Failed to build pycocotools ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
时间: 2023-12-10 22:40:06 浏览: 341
Weditor包,安装weditor失败,subprocess-exited-with-error
这个错误通常是由于缺少 Visual C++ Build Tools 或者缺少 Microsoft Visual C++ Redistributable for Visual Studio 导致的。你可以尝试安装这些软件来解决问题。
此外,你也可以尝试使用 Anaconda 或者 Miniconda 来安装 pycocotools。你可以先安装 Anaconda 或者 Miniconda,然后使用以下命令来创建一个新的虚拟环境并安装 pycocotools:
```
conda create --name myenv
conda activate myenv
conda install -c conda-forge pycocotools
```
其中 `myenv` 是你想要创建的虚拟环境的名称。
阅读全文