Skip to content

Conversation

@IonThief
Copy link

@IonThief IonThief commented Jan 11, 2026

Motivation

ModuleNotFoundError encountered when installing mmengine from source or running tests in a fresh environment.

Currently, the requirements/runtime.txt file is missing opencv-python-headless, which is present in runtime_lite.txt but not linked in the full runtime requirements. This causes pip install . to create an environment where cv2 is missing.

Additionally, expecttest is required by the test suite but is missing from requirements/tests.txt.

Modification

Added opencv-python-headless to requirements/runtime.txt

Added expecttest to requirements/tests.txt

BC-breaking

No

This change only adds missing dependencies to ensure the environment is built correctly. It does not remove or change existing APIs.

Use cases

Case 1: Installing from source

User clones the repo and runs pip install .

Before: ImportError: No module named cv2

After: OpenCV is installed as part of MMEngine installation

Case 2: Running tests

User runs pytest tests

Before: Failed tests with ModuleNotFoundError: No module named expecttest

After: Tests run properly

Checklist

  • Pre-commit or other linting tools are used to fix the potential lint issues.

  • The modification is covered by complete unit tests. (N/A, this is a dependency fix)

  • If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDetection or MMPretrain. (Safe, adds missing dependencies only)

  • The documentation has been modified accordingly, like docstring or example tutorials. (N/A)

@CLAassistant
Copy link

CLAassistant commented Jan 11, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants