在使用pip install pycocotools时安装的时pycocotools2.0版本,和detectron2要求的不匹配,
解决方法:
1、去官网下载2.0.2的文件,文件链接,
地址为https://pypi.org/project/pycocotools/2.0.2/#files,
按照这个链接安装,但里面要求删除的东西不要删除
https://blog.csdn.net/Ema1997/article/details/107178496
安装完成后,如果以前安装了pycocotools2.0版本,此时有两个版本的pycocotools,需要先pip uninstall pycocotools,卸载pycocotools2.0版本,保留新生成的pycocotools2.0.2版本.
在去安装detectron2,安装链接在https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md