cocodataset / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
6.12k stars 3.76k forks source link

ModuleNotFoundError: No module named 'pycocotools._mask' PLEASE HELP ME!!!! #365

Open Brayden1000 opened 4 years ago

Brayden1000 commented 4 years ago

I am running into errors when running object_detection models_main.py and getting the error:

Traceback (most recent call last):
File "model_main.py", line 25, in <module>
from object_detection import model_lib
File "C:\Python37\models\research\object_detection\model_lib.py", line 27, in <module>
from object_detection import eval_util
File "C:\Python37\models\research\object_detection\eval_util.py", line 33, in <module>
from object_detection.metrics import coco_evaluation
File "C:\Python37\models\research\object_detection\metrics\coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "C:\Python37\models\research\object_detection\metrics\coco_tools.py", line 51, in <module>
from pycocotools import coco
File "C:\Python37\models\research\pycocotools\coco.py", line 55, in <module>
from . import mask as maskUtils
File "C:\Python37\models\research\pycocotools\mask.py", line 3, in <module>
import pycocotools._mask as _mask
ModuleNotFoundError: No module named 'pycocotools._mask'

I am running a Windows 10 x64 machine and I do find the _mask.pyx file in the path specified but it still can't find it for some reason! I have followed the instructions off of this website. Any help is much appreciated, I have run the build.py off of the cocoAPI since I am on windows. I have tried to install pycotools through pip. I have gone through every website with this issue mentioned and nothing has worked!!!! Thanks!

henrigi88 commented 4 years ago

Hei Brayden1000, did you fix this issue?

Fly-dream12 commented 4 years ago

This problem happens because your python version is 3.7, you should rebuild it under python 3.6 as the instructions in the website you have mentioned. @Brayden1000 ,@henrigi88. Hope it can help.