错误信息:
......
gcc: error: ../common/maskApi.c: No such file or directory
error: command '/usr/bin/gcc' failed with exit code 1
[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
安装 pycocotools 2.0.3 版本时出现如上错误,而安装 2.0.6 版本时不会有如上错误。
解决方法:
安装较低版本的cpython:
pip install cython==0.29.36
然后再安装pycocotools。