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: cannot import name 'get_dist_info' from 'mmcv.runner.utils'

See original GitHub issue

When I run this command: python tools/demo.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_5.pth.stu demo/ result_demo/

I am getting this error: ImportError: cannot import name 'get_dist_info' from 'mmcv.runner.utils'

I have installed mmdetection as per your instructions and also tried for conda-instruction.

I updated mmcv as per the suggestions got online but nothing is working. Now my mmcv version is 0.4.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Varat7v2commented, Apr 25, 2020

I solved this issue by downgrading mmcv from 0.4.4 to 0.2.14 and the demo.py is running fine but there are no any bounding boxes on the result images.

0reactions
hasanirtizacommented, Apr 26, 2022

Most probably it is still an installation issue, after installing mmcv did you compile Pedestron using the following command ? python setup.py develop

Secondly, juts have a look at the installation page and see if you have followed all the instructions correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot import name 'get_dist_info' from 'mmcv.runner.utils ...
This error is caused by mmcv v0.2.15, you need to update mmdet to the latest version to use the latest mmcv.
Read more >
cannot import name 'get_dist_info' from 'mmcv.runner.utils'
ImportError : cannot import name 'get_dist_info' from 'mmcv.runner.utils'
Read more >
Source code for mmcv.runner.utils
[docs]def get_host_info() -> str: """Get hostname and username. Return empty string if exception raised, e.g. ``getpass.getuser()`` will lead to error in ...
Read more >
mmcv版本过低Error: ImportError: cannot import name ...
程序1-----https://github.com/csuhan/s2anet bug1:ImportError: cannot import name 'get_dist_info' from 'mmcv.runner.utils' ...
Read more >
mmcv_custom/checkpoint.py · CVPR/WALT at main
from torch.utils import model_zoo ... from mmcv.runner import get_dist_info ... Logger`, optional): Logger to log the error. message.
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