python调用 from pycocotools.coco import COCO时,出现错误:
ImportError: No module named pycocotools.coco
解决方法是安装ipython,安装步骤如下.
下载安装包:
git clone https://github.com/pdollar/coco
进入PythonAPI目录:
cd coco/PythonAPI
编译安装ipython:
make -j8
安装成功后,进入ipython解释器,即终端输入:
ipython
重新输入import COCO命令:
from pycocotools.coco import COCO