LogoWonderful Launcher
  • Product
  • Pricing
  • Solutions
  • Docs
  • Blog
  • Get Help
  • Download

ComfyUI MMCV Install Failed: pip install mmcv exited with code 1

Needs verification

Fix mmcv, mmcv-lite, and OpenMMLab wheel failures in ComfyUI without breaking Torch, CUDA, or OpenCV.

You can fix it manually, or download Wonderful Launcher for Windows to diagnose plugin errors, missing dependencies, and broken ComfyUI environments without reinstalling.

Download free for Windows

If you searched for pip install mmcv exited with code 1, failed to build mmcv, No module named 'mmcv', or No module named 'mmcv._ext', the short answer is this:

do not keep retrying a plain pip install mmcv from a random terminal. MMCV must match the Python, PyTorch, CUDA, and OpenMMLab stack that your ComfyUI process actually uses.

Common Error Messages

You may see one of these:

pip install mmcv exited with code 1
ERROR: Failed building wheel for mmcv
ModuleNotFoundError: No module named 'mmcv'
ModuleNotFoundError: No module named 'mmcv._ext'

or a pip check warning:

mmcv requires opencv-python, which is not installed

These messages do not all mean the same thing. No module named 'mmcv' means the package is missing. No module named 'mmcv._ext' usually means the plugin expected MMCV's compiled ops, not just the lite Python package.

Why MMCV Fails in ComfyUI

MMCV is part of the OpenMMLab computer vision ecosystem. Some ComfyUI custom nodes pull it indirectly for detection, segmentation, pose, or video helper workflows.

The difficult part is that MMCV has two package families:

PackageWhat It ContainsPractical Meaning in ComfyUI
mmcvFull MMCV with compiled CPU/CUDA opsNeeded when a plugin imports mmcv.ops or mmcv._ext
mmcv-litePython-side MMCV without CUDA opsEnough only when the plugin does not need compiled ops

OpenMMLab's own installation docs warn not to install both versions in the same environment. In ComfyUI, mixing them can make the import state harder to reason about.

First Decide If MMCV Is Actually Blocking You

MMCV is not a core ComfyUI dependency. Fix it only when:

  • the startup log shows an IMPORT FAILED for a plugin you need
  • the workflow has red nodes from a plugin that depends on MMCV
  • the traceback names mmcv, mmcv.ops, or mmcv._ext

If ComfyUI starts, the plugin you need imports, and the workflow runs, a stray pip check warning is not automatically worth changing the environment for.

Step 1: Use the Correct Python

Plain pip install often targets the wrong Python. Run checks with the same Python that starts ComfyUI.

Install typeCheck command
Official GitHub Windows portable packageFrom the portable package root: .\python_embeded\python.exe -s -c "import torch; print(torch.__version__, torch.version.cuda)"
Manual Git + venv installActivate the venv, then run python -c "import torch; print(torch.__version__, torch.version.cuda)"
ComfyUI Desktop or managed launcherUse the app's environment or terminal tooling instead of assuming a portable python_embeded folder

Record:

  • Python version
  • PyTorch version
  • CUDA version reported by PyTorch
  • whether the plugin needs mmcv._ext

Step 2: Remove Mixed MMCV Installs

If both packages are installed, clean them before choosing one path:

python -m pip uninstall -y mmcv mmcv-lite

For the official Windows portable package:

.\python_embeded\python.exe -s -m pip uninstall -y mmcv mmcv-lite

Then restart ComfyUI only after installing the package you actually need.

Step 3: Choose Lite or Full MMCV

Case 1: The plugin only needs import mmcv

Try mmcv-lite first:

python -m pip install mmcv-lite
python -c "import mmcv; print(mmcv.__version__)"

For the official Windows portable package:

.\python_embeded\python.exe -s -m pip install mmcv-lite
.\python_embeded\python.exe -s -c "import mmcv; print(mmcv.__version__)"

This is the lower-risk path when the custom node does not need MMCV CUDA operators.

Case 2: The error names mmcv._ext or mmcv.ops

mmcv-lite is not enough. You need full MMCV built for a compatible Python, PyTorch, and CUDA combination.

OpenMMLab recommends using openmim for MMCV installation:

python -m pip install -U openmim
mim install "mmcv>=2.0.0rc1"

For the official Windows portable package, make sure the mim executable comes from the embedded Python environment:

.\python_embeded\python.exe -s -m pip install -U openmim
.\python_embeded\Scripts\mim.exe install "mmcv>=2.0.0rc1"

Watch the install log. If it downloads a .whl, you found a prebuilt wheel. If it downloads a .tar.gz and starts compiling, there may be no matching prebuilt wheel for your combination. On Windows, forcing a source build can fail or take a long time.

Step 4: Handle OpenCV Separately

If the only remaining line is:

mmcv requires opencv-python, which is not installed

do not stack several OpenCV packages to satisfy every warning. Install one OpenCV flavor and verify cv2:

python -m pip install opencv-python-headless
python -c "import cv2; print(cv2.__version__)"

Use the OpenCV guide if your environment already has multiple OpenCV packages or a NumPy/OpenCV import conflict.

Verify the Repair

Check the package import:

python -c "import mmcv; print(mmcv.__version__)"

If your plugin needs compiled ops, also check:

python -c "import mmcv.ops; print('mmcv ops available')"

Then restart ComfyUI and check:

http://127.0.0.1:8188/v2/customnode/import_fail_info_bulk

If the same plugin still appears there, read the next traceback. MMCV may have been only the first missing layer.

When to Stop

Stop and reconsider before doing any of these:

  • downgrading PyTorch just to satisfy MMCV
  • installing both mmcv and mmcv-lite
  • installing Visual Studio Build Tools only because pip fell back to a source build
  • changing NumPy, OpenCV, and Torch in one command
  • repairing MMCV when the workflow you use does not need that plugin

For multi-plugin environments, it is often safer to isolate the MMCV workflow or recover the environment through Wonderful Launcher than to keep broad package changes in the main ComfyUI install.

Related Guides

  • ComfyUI Dependency Conflicts
  • OpenCV (cv2) Missing or Conflicting
  • How to Fix ComfyUI Plugin Import Failed Errors
  • Workflow Environment Setup

Source References

  • MMCV official installation guide
  • OpenMMLab MMCV GitHub repository
  • Official ComfyUI custom node troubleshooting guide

You can fix it manually, or download Wonderful Launcher for Windows to diagnose plugin errors, missing dependencies, and broken ComfyUI environments without reinstalling.

Download free for Windows
Keep reading:Repair dependency conflictsFix OpenCV cv2 conflictsFix plugin import failures

You can fix it manually, or download Wonderful Launcher for Windows to diagnose plugin errors, missing dependencies, and broken ComfyUI environments without reinstalling.

Download free for Windows

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

Common Error Messages
Why MMCV Fails in ComfyUI
First Decide If MMCV Is Actually Blocking You
Step 1: Use the Correct Python
Step 2: Remove Mixed MMCV Installs
Step 3: Choose Lite or Full MMCV
Case 1: The plugin only needs import mmcv
Case 2: The error names mmcv._ext or mmcv.ops
Step 4: Handle OpenCV Separately
Verify the Repair
When to Stop
Related Guides
Source References