问题在于pycocotool没有安装好
去https://github.com/philferriere/cocoapi下载这个项目
然后cd进PythonAPI文件夹下 执行make命令
再pip install -i https://pypi.tuna.tsinghua.edu.cn/sample pycocotools 确保安装
如果正确安装是不会再报错的