No module named 'mmcv._ext'

See original GitHub issue

Issue Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
yuzhjcommented, Sep 15, 2020

you can have a try pip uninstall mmcv pip install mmcv-full

0reactions
ejduwellcommented, May 4, 2022

For anyone still having trouble with the "no module named ‘mmcv.ext’ above: I had this issue as well working in OSX on a new m1 macbook. I was able to solve the issue by building mmcv from source. There are detailed directions on how to do so here:

https://mmcv.readthedocs.io/en/latest/get_started/build.html

However, I’ve also pasted the steps below:

git clone https://github.com/open-mmlab/mmcv.git cd mmcv

pip install -r requirements/optional.txt

!“If you are on macOS, add the following environment variables before the installing command.”!: CC=clang CXX=clang++ CFLAGS=‘-stdlib=libc++’ MMCV_WITH_OPS=1 pip install -e .

I complied/installed mmcv in my /opt/anaconda3/lib/python3.9/site-packages/ directory along with mmocr. That way they are both automatically on my path in my anaconda/python environments.

Hope this helps, Ethan

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'mmcv._ext' #3271
I was getting ModuleNotFoundError: No module named 'mmcv.ops', so I tried installing mmcv==0.6.2 and mmdet==2.2.1, but then I got the error, ...
Read more >
MMCV Installation — MMDetection 2.11.0 documentation
“No module named 'mmcv.ops'”; “No module named 'mmcv._ext'”. Uninstall existing mmcv in the environment using pip uninstall mmcv . Install mmcv-full ...
Read more >
ModuleNotFoundError: No module ... - Eric A. Scuccimarra
An article in Eric A. Scuccimarra's blog titled ModuleNotFoundError: No module named 'mmcv._ext'
Read more >
ModuleNotFoundError: No module named 'mmcv._ext'
ModuleNotFoundError: No module named 'mmcv._ext'. If you are getting this error when trying to run the latest version of mmdet with the ...
Read more >
ModuleNotFoundError: No module named 'mmcv._ext'解决方案
一、问题描述使用目标检测开源MMDetection时,出现如下报错:ModuleNotFoundError: No module named 'mmcv._ext'二、问题分析.
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