Environment:Google deepmind Dm control Python MuJoCo Runtime
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Reinforcement_Learning, Physics_Simulation |
| Last Updated | 2026-02-15 05:00 GMT |
Overview
Python 3.9+ environment with MuJoCo >= 3.5.0, NumPy, SciPy, and supporting libraries for physics-based reinforcement learning simulation.
Description
This environment defines the core Python runtime required to use dm_control. It centers on MuJoCo >= 3.5.0 as the physics engine, with Python 3.9 or newer as the language runtime. The stack includes numerical libraries (NumPy, SciPy), XML processing (lxml, pyparsing), protocol buffers, and the dm-env reinforcement learning interface. All Control Suite, Composer, Locomotion, Manipulation, and Soccer environments depend on this base runtime.
Usage
Use this environment for any dm_control workflow. It is the mandatory prerequisite for all implementations in this repository, including Control Suite environment loading, Composer environment assembly, MJCF model manipulation, and interactive visualization.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux (recommended), macOS, Windows | Linux is the primary development/CI platform |
| Python | >= 3.9 | Enforced in setup.py; tested on 3.9, 3.10, 3.11+ |
| Hardware | CPU (minimum) | GPU optional, only needed for hardware-accelerated rendering |
| Disk | ~500MB | Includes MuJoCo binaries, model assets, and mesh files |
Dependencies
System Packages
- MuJoCo native library (bundled with `mujoco` Python package)
Python Packages
- `mujoco` >= 3.5.0
- `absl-py` >= 0.7.0
- `dm-env` (any version)
- `dm-tree` != 0.1.2
- `numpy` >= 1.9.0
- `scipy` (any version)
- `lxml` (any version)
- `pyparsing` >= 3.0.0
- `protobuf` >= 3.19.4
- `pyopengl` >= 3.1.4
- `glfw` (any version)
- `labmaze` (any version)
- `requests` (any version)
- `setuptools` != 50.0.0
- `tqdm` (any version)
Optional Packages
- `h5py` -- Required for HDF5 motion capture trajectory loading. Install with `pip install dm_control[HDF5]`.
Credentials
No credentials or API keys are required for core functionality.
Quick Install
# Standard install
pip install dm_control
# With HDF5 support for motion capture data
pip install dm_control[HDF5]
Code Evidence
Python version constraint from `setup.py:186`:
python_requires='>=3.9',
MuJoCo version constraint from `setup.py:194`:
install_requires=[
...
'mujoco >= 3.5.0',
...
],
Excluded setuptools version from `setup.py:200`:
'setuptools!=50.0.0', # https://github.com/pypa/setuptools/issues/2350
Optional h5py import guard from `locomotion/mocap/loader.py:88-94`:
try:
import h5py
except ImportError:
raise ImportError(
'h5py not found. When installing dm_control, use '
'`pip install dm_control[HDF5]` to enable HDF5TrajectoryLoader.')
Build system requires MuJoCo headers from `setup.py:25,40-48`:
import mujoco
HEADER_FILENAMES = [
'mjdata.h', 'mjmodel.h', 'mjrender.h', 'mjtnum.h',
'mjui.h', 'mjvisualize.h', 'mjxmacro.h', 'mujoco.h',
]
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ImportError: cannot import name 'constants' from partially initialized module 'dm_control.mujoco.wrapper.mjbindings'` | Attempted editable install (`pip install -e`) | Use standard install: `pip install dm_control` (editable mode not supported) |
| `ImportError: h5py not found` | h5py not installed | `pip install dm_control[HDF5]` |
| `RuntimeError: No OpenGL rendering backend is available.` | No OpenGL backend (GLFW, EGL, OSMesa) could be imported | Install GLFW, configure EGL, or install OSMesa libraries |
| `mjbindings failed to import mjlib` | MuJoCo shared library not found | Verify `mujoco` package is installed: `pip install mujoco>=3.5.0` |
Compatibility Notes
- Editable Mode: `pip install -e .` is not supported due to legacy auto-generated MuJoCo bindings. Use `pip install dm_control` instead.
- setuptools 50.0.0: Explicitly excluded due to a known bug (pypa/setuptools#2350).
- dm-tree 0.1.2: Explicitly excluded due to incompatibility.
- NumPy version: Version-specific pins exist: NumPy 2.3.2 for Python 3.11+, 2.2.6 for Python 3.10, 2.0.2 for Python 3.9.
- macOS: Rendering operations must run on the main thread due to GLFW/macOS threading constraints.
Related Pages
- Implementation:Google_deepmind_Dm_control_Suite_Load
- Implementation:Google_deepmind_Dm_control_Composer_Environment
- Implementation:Google_deepmind_Dm_control_MJCF_RootElement_Parser
- Implementation:Google_deepmind_Dm_control_MJCF_Physics
- Implementation:Google_deepmind_Dm_control_Manipulation_Load
- Implementation:Google_deepmind_Dm_control_Soccer_Load
- Implementation:Google_deepmind_Dm_control_Tolerance_Reward