【发布时间】:2018-09-05 19:32:11
【问题描述】:
听说原来的 COCOAPI 存在 python 版本不兼容的问题,并且它不适用于 python 3?所以我正在使用这个版本: https://github.com/philferriere/cocoapi
但我遇到了与使用原始 COCOAPI 时类似的问题。
运行后:pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI, 我设法得到:成功构建 pycocotools
当我尝试在 PythonAPI 文件夹下制作时: .../cocoapi-master/PythonAPI$ 制作
它返回没有任何错误: python setup.py build_ext --inplace 运行 build_ext rm -rf 构建
但是,当我尝试运行时:.../cocoapi-master/PythonAPI$ python Makefile 我不断收到此错误: 文件“Makefile”,第 1 行 全部: ^ SyntaxError: 无效语法
当我尝试运行时:.../cocoapi-master/PythonAPI/demos$ python pycocoDemo.ipynb 我收到此错误: 回溯(最近一次通话最后): 文件“pycocoDemo.ipynb”,第 7 行,在 “崩溃”:是的 NameError: name 'true' 没有定义
在此之前,我尝试运行和安装原始 cocoapi (https://github.com/cocodataset/cocoapi/tree/master/PythonAPI),但它给出了类似的错误。我四处搜索并尝试安装额外的软件包,升级 pip 版本等,但都没有工作......有人可以告诉我吗?非常感谢您的帮助!!!
Python 版本:3.5.2, 点子版本:18.0, Cython 版本:0.28.5, pycocotools-2.0, numpy.version.version: '1.14.2'
【问题讨论】:
标签: python makefile installation python-3.5 image-segmentation