2017-fall-DL-training-program / ImageCaption

1 stars 0 forks source link

pycocotools import issue #10

Closed zenccc closed 7 years ago

zenccc commented 7 years ago

hello, I got the error message "ImportError: No module named pycocotools.coco", it is coming from eval_utils.py #line 32, any idea about this? I am sure that it run with python 2.7.

connie980149 commented 7 years ago

Did you copy the ./coco_caption to your work space?

fansia commented 7 years ago

I have written a letter to IT to install this lib for us last Friday(11/10).

connie980149 commented 7 years ago

I remember that IT had downloaded the coco_caption, maybe you can try to find it under /homework/datasets.

fansia commented 7 years ago

quoted from email:

Hi, Eric,

我們發現助教給的dataset裡面就有pycocotools,

請把datasets/coco-caption設定在你的pythonpath內既可: Ex: @tcsh setenv PYTHONPATH ~/datasets/coco-caption/ echo $PYTHONPATH /home/student47/datasets/coco-caption/

:~/datasets/coco-caption% python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from pycocotools.coco import COCO

dir(COCO) ['doc', 'init', 'module', 'createIndex', 'decodeMask', 'encodeMask', 'getAnnIds', 'getCatIds', 'getImgIds', 'info', 'loadAnns', 'loadCats', 'loadImgs', 'loadRes', 'segToMask', 'showAnns']