解决No module named 'pycocotools'

pip install pycocotools


出现如下bug,则:

File "/...../lib/python3.6/site-packages/pycocotools/coco.py", line 308, in loadRes
if type(resFile) == str or type(resFile) == unicode:

NameError: name 'unicode' is not defined

 

解决:pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'

 

 
posted @ 2020-04-03 10:43  U_C  阅读(5258)  评论(0编辑  收藏  举报