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.

ModuleNotFoundError: No module named 'mmcv._ext'

See original GitHub issue

hi,i’m new to the mmdetection and after using it for one day a few days ago,it seems that from last updates to mmdetection repository,installing it on colab is not the same! while commands below:

!pip install mmcv
!git clone https://github.com/open-mmlab/mmdetection.git
%cd mmdetection
!python setup.py develop

worked perfectly fine few days ago,now i get these logs from executing above:

/content/mmdetection running develop running egg_info writing mmdet.egg-info/PKG-INFO writing dependency_links to mmdet.egg-info/dependency_links.txt writing requirements to mmdet.egg-info/requires.txt writing top-level names to mmdet.egg-info/top_level.txt writing manifest file ‘mmdet.egg-info/SOURCES.txt’ /usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py:305: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja… Falling back to using the slow distutils backend. warnings.warn(msg.format(‘we could not find ninja.’)) running build_ext Creating /usr/local/lib/python3.6/dist-packages/mmdet.egg-link (link to .) mmdet 2.3.0rc0+f92765b is already the active version in easy-install.pth

Installed /content/mmdetection Processing dependencies for mmdet==2.3.0rc0+f92765b Searching for torchvision==0.6.1+cu101 Best match: torchvision 0.6.1+cu101 Adding torchvision 0.6.1+cu101 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for torch==1.5.1+cu101 Best match: torch 1.5.1+cu101 Adding torch 1.5.1+cu101 to easy-install.pth file Installing convert-caffe2-to-onnx script to /usr/local/bin Installing convert-onnx-to-caffe2 script to /usr/local/bin

Using /usr/local/lib/python3.6/dist-packages Searching for terminaltables==3.1.0 Best match: terminaltables 3.1.0 Adding terminaltables 3.1.0 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for six==1.12.0 Best match: six 1.12.0 Adding six 1.12.0 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for Pillow==6.2.2 Best match: Pillow 6.2.2 Adding Pillow 6.2.2 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for numpy==1.18.5 Best match: numpy 1.18.5 Adding numpy 1.18.5 to easy-install.pth file Installing f2py script to /usr/local/bin Installing f2py3 script to /usr/local/bin Installing f2py3.6 script to /usr/local/bin

Using /usr/local/lib/python3.6/dist-packages Searching for matplotlib==3.2.2 Best match: matplotlib 3.2.2 Adding matplotlib 3.2.2 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for future==0.16.0 Best match: future 0.16.0 Adding future 0.16.0 to easy-install.pth file Installing futurize script to /usr/local/bin Installing pasteurize script to /usr/local/bin

Using /usr/local/lib/python3.6/dist-packages Searching for pyparsing==2.4.7 Best match: pyparsing 2.4.7 Adding pyparsing 2.4.7 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for python-dateutil==2.8.1 Best match: python-dateutil 2.8.1 Adding python-dateutil 2.8.1 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for kiwisolver==1.2.0 Best match: kiwisolver 1.2.0 Adding kiwisolver 1.2.0 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Searching for cycler==0.10.0 Best match: cycler 0.10.0 Adding cycler 0.10.0 to easy-install.pth file

Using /usr/local/lib/python3.6/dist-packages Finished processing dependencies for mmdet==2.3.0rc0+f92765b

which are different from the past. also after installing it like above,print_config functionality works fine,but train functionality and commands like:

from mmdet.apis.inference import show_result_pyplot,init_detector,inference_detector

return:

ModuleNotFoundError: No module named ‘mmcv._ext’

so,what is the problem?is it installing correctly? anything that i’m missing?!

thank u in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
hellockcommented, Jul 11, 2020

If you install it via pip install mmcv, the lite version is installed, which does not contain mmcv._ext.

1reaction
EthanZhangYicommented, Jul 12, 2020

@liuzili97 @farshid-mi I solved this problem I met yesterday. Maybe you can check the result of pip list. I install mmcv-full manually and then install mmdetection3d. However, mmdeetection3d will install mmcv again automatically. Thus there are two versions of mmcv. Just pip uninstall mmcv and this problem is fixed.

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
Compatibility issue between MMCV and MMDetection; “ConvWS is already registered in conv layer”; ... “No module named 'mmcv.ops'”; “No module named 'mmcv.
Read more >
ModuleNotFoundError: No module named 'mmcv._ext'
An article in Eric A. Scuccimarra's blog titled ModuleNotFoundError: No module named 'mmcv._ext'
Read more >
ModuleNotFoundError: No module named 'mmcv._ext'解决方案
一、问题描述使用目标检测开源MMDetection时,出现如下报错:ModuleNotFoundError: No module named 'mmcv._ext'二、问题分析.
Read more >
ViTPose - a Hugging Face Space by Gradio-Blocks
Found existing installation: mmcv-full 1.5.0 Uninstalling ... _gcd_import(name[level:], package, level) 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