繁体   English   中英

为python 3.5.2安装COCOAPI

[英]Installation of COCOAPI for python 3.5.2

我听说原始 COCOAPI 存在 python 版本不兼容问题,并且它不适用于 python 3? 所以我使用这个版本: https : //github.com/philferriere/cocoapi

但是我面临着与使用原始 COCOAPI 时类似的问题。

运行后:pip install git+ https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI ,我设法得到:成功构建pycocotools

当我尝试在 PythonAPI 文件夹下 make 时: .../cocoapi-master/PythonAPI$ make

它返回没有任何错误: python setup.py build_ext --inplace running build_ext rm -rf build

但是,当我尝试运行时:.../cocoapi-master/PythonAPI$ python Makefile 我不断收到此错误:文件“Makefile”,第 1 行全部:^ SyntaxError:语法无效

当我尝试运行时:.../cocoapi-master/PythonAPI/demos$ python pycocoDemo.ipynb 我收到此错误:Traceback(最近一次调用最后一次):文件“pycocoDemo.ipynb”,第 7 行,“折叠”:true NameError: 名称 'true' 未定义

在此之前,我曾尝试运行和安装原始 cocoapi ( https://github.com/cocodataset/cocoapi/tree/master/PythonAPI ) 但它给出了类似的错误。 我四处搜索并尝试安装额外的软件包,升级 pip 版本等,但没有一个工作......有人请告诉我吗? 您的帮助将不胜感激!!!

Python 版本:3.5.2,Pip 版本:18.0,Cython 版本:0.28.5,pycocotools-2.0,numpy.version.version:'1.14.2'

这是一个makefile问题。 只需在 make 之后忽略 makefile 就可以了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM