question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named _mask

See original GitHub issue

I run this code python train.py --cfg=./experiments/cfgs/ssd_vgg16_train_voc.yml and this is what i get:

python train.py --cfg=./experiments/cfgs/ssd_vgg16_train_voc.yml
Traceback (most recent call last):
  File "train.py", line 20, in <module>
    from lib.ssds_train import train_model
  File "/home/alireza/Desktop/ssd/B/lib/ssds_train.py", line 23, in <module>
    from lib.dataset.dataset_factory import load_data
  File "/home/alireza/Desktop/ssd/B/lib/dataset/dataset_factory.py", line 2, in <module>
    from lib.dataset import coco
  File "/home/alireza/Desktop/ssd/B/lib/dataset/coco.py", line 13, in <module>
    from lib.utils.pycocotools.coco import COCO
  File "/home/alireza/Desktop/ssd/B/lib/utils/pycocotools/coco.py", line 55, in <module>
    from . import mask as maskUtils
  File "/home/alireza/Desktop/ssd/B/lib/utils/pycocotools/mask.py", line 3, in <module>
    import lib.utils.pycocotools._mask as _mask
ImportError: No module named _mask

Any idea why?? Also What python version are using? Plut where should i put the dataset (eg coco vgg)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
seongkyuncommented, Aug 15, 2018

I have solved this problem without any upgrading python version. My python version is Python 3.5. The problem is just /home/username/ssds.pytorch/lib/utils/pycocotools/_mask.cpython-36m-x86_64-linux-gnu.so file. Just install COCOAPI following https://github.com/cocodataset/cocoapi instruction and copy and paste _mask.cpython-**YOUR_PYTHON_VERSION**m-x86_64-linux-gnu.so file to /home/username/ssds.pytorch/lib/utils/pycocotools

then the error will be dissappeared.

0reactions
seongkyuncommented, May 19, 2019

@stalagmite7 You can find that folder at your_dir/cocoapi/PythonAPI/pycocotools

Read more comments on GitHub >

github_iconTop Results From Across the Web

no module named _mask? #59 - cocodataset/cocoapi - GitHub
5 # Interface for manipulating masks stored in RLE format. ImportError: No module named _mask.
Read more >
ModuleNotFoundError: No module named 'pycocotools._mask'
The answer is summarise from these three GitHub issues. 1.whether you have installed cython in the correct version.
Read more >
rasterio: ImportError: No module named tools.mask
I was trying to rasterize a geojson using rasterio mask function but there is an issue with importing the function
Read more >
Modulenotfounderror: no module named pycocotools ( Solved )
modulenotfounderror : no module named pycocotools error occurs because of incompatibility of pycocotools in various top layer packages (TensorFlow etc).
Read more >
Frequently Asked Questions - PyRadiomics - Read the Docs
... “<path/to/image>,<path/to/mask>” is not). I installed PyRadiomics, but when I run the jupyter notebook, I get ImportError: No module named radiomics.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found