Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'pycocotools' has no attribute '__version__' #3761

Closed
jialeli1 opened this issue Sep 14, 2020 · 8 comments
Closed

AttributeError: module 'pycocotools' has no attribute '__version__' #3761

jialeli1 opened this issue Sep 14, 2020 · 8 comments

Comments

@jialeli1
Copy link

Hi, I installed mmdet according to the instructions, but I still encountered this problem.

File "/home/lijiale/mmdet_install/mmdetection/mmdet/datasets/coco.py", line 19, in
assert pycocotools.version >= '12.0.2'
AttributeError: module 'pycocotools' has no attribute 'version'

I also tried to install pycocotools from open-mmlab/cocoapi, but I found that it installed mmpycocotools. When I run pip list | grep pycocotools, I found that there are two pycocotools.

(open-mmlab) lijiale@ImageLab:~/mmdet_install/mmdetection3d$ pip list | grep pycocotools
mmpycocotools 12.0.2
pycocotools 2.0.2

Maybe this is the problem, but I don't know the specific reason. Could someone help me?

@yuzhj
Copy link
Contributor

yuzhj commented Sep 15, 2020

pip uninstall pycocotools

@ZwwWayne
Copy link
Collaborator

Please use the mmlab maintained pycocotools. To do that, you should first pip uninstall pycocotools and pip install mmpycocotools.

@alistarhu
Copy link

import pycocotools pycocotools.file, to locate the pycocotools path which is used in current python environment. Then uninstall it.

@naveenggmu
Copy link

Hey @ZwwWayne, when I install mmpycocotools, I get back the error ModuleNotFoundError: No module named 'pycocotools'
Would be great if you can help me out.

@demerzel1
Copy link

Hey @ZwwWayne, when I install mmpycocotools, I get back the error ModuleNotFoundError: No module named 'pycocotools'
Would be great if you can help me out.

Hey, I got this problem too. I solved it by uninstall mmpycocotools, and install it again.
Hope can help you!

@dlutzhouyue
Copy link

Hey @ZwwWayne, when I install mmpycocotools, I get back the error ModuleNotFoundError: No module named 'pycocotools'
Would be great if you can help me out.

Hey, I got this problem too. I solved it by uninstall mmpycocotools, and install it again.
Hope can help you!

it works for me! thx

@AhmadIbtehaj
Copy link

Hey @ZwwWayne, when I install mmpycocotools, I get back the error ModuleNotFoundError: No module named 'pycocotools'
Would be great if you can help me out.

Hey, I got this problem too. I solved it by uninstall mmpycocotools, and install it again. Hope can help you!

it worked for me

@thelandord
Copy link

Hey @ZwwWayne, when I install mmpycocotools, I get back the error ModuleNotFoundError: No module named 'pycocotools'
Would be great if you can help me out.

Hey, I got this problem too. I solved it by uninstall mmpycocotools, and install it again. Hope can help you!

it works for me . But I have a new bug.
FileNotFoundError: CocoDataset: [Errno 2] No such file or directory: 'data/nuimages/annotations/nuimages_v1.0-train.json'
I can't find this josn file. Could someone help me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants