No module named 'mmcv._ext'
See original GitHub issue
Thanks for your error report and we appreciate it a lot.
Checklist
- I have searched related issues but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug A clear and concise description of what the bug is.
Reproduction
- What command or script did you run?
A placeholder for the command.
- Did you make any modifications on the code or config? Did you understand what you have modified?
- What dataset did you use?
Environment
- Please run
python mmdet/utils/collect_env.pyto collect necessary environment information and paste it here. - 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:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
you can have a try pip uninstall mmcv pip install mmcv-full
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