remove the pycocotools >> pip uninstall pycocotools instead of using pip, try using this: >> pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI