配置COCO API(安装COCO)

仍旧是win10,Python3.5

从GitHub下载coco源码,解压到任意文件夹。(或者创建一个工程)coco源码链接 https://github.com/cocodataset/cocoapi

在cmd窗口,cd到PythonAPI目录,执行 python setup.py install

可能遇见的问题:

  1. 找不到vcversall.bat,解决办法:安装Visual Studio2015。(因为python3.5的相关编译,需要“best version>=14.0”。)

  2. 找不到参数'-Wno-cpp','-Wno-unused-function',解决办法:在setup.py文件中删除相关参数


    重新执行

    python setup.py install

    完成cocoapi的安装。安装成功,可以看在python的三方lib中(路径通常在libsite-packages)看到pycocotools,

原文地址:https://www.cnblogs.com/yihe/p/8467984.html