Run pip uninstall pycocotools first. Then run pip install mmpycocotools to install open-mmlab forked pycocotools.
卸载pycocotools
pip uninstall pycocotools
安装mmpycocotools
pip install mmpycocotools
!!报错
Failed to build mmpycocotools
ERROR: Could not build wheels for mmpycocotools, which is required to install pyproject.toml-based projects
解决方法
安装cython=0.29.33版本就可以解决
pip3 install cython==0.29.33 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
再重新安装mmpycocotools
pip install mmpycocotools
安装成功!!