Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Python wrapper for MuJoCo physics simulation.

Project description

This is a simple python wrapper around the MuJoCo physics simulation. I wrote it when I couldn’t fix the GLEW initialization error with mujoco-py. Please note: this library is a partial replacement (not a supplement) to mujoco-py. It is does not have all of the features of mujoco-py but it is much simpler and easier to understand. If there are additional capabilities you want added, please feel free to post an issue.



pip install mujoco


Building pypi wheels for linux packages that use C extensions (like this one) is very difficult (nay impossible?). Please install from source:

cd /path/to/cloned/directory
pip install -e .


Examples are located in the examples/ directory.


EGL is a graphics library for linux GPUs which speeds up offscreen rendering. First, you need to install libegl1-mesa and check that /usr/include/EGL/egl.h exists. Second, you must define the environment variable EGL=1. Otherwise, the code defaults to GLFW. Note that when using EGL, you cannot render to the screen (you can still render offscreen).


One of the main design decisions behind this implementation was to use the exact same libraries that Emo’s original MuJoCo code uses in the provided Makefile. That way if my version doesn’t work, you can bet that Emo’s code doesn’t work either. I think the reason why mujoco-py stopped working is that it tried to get fancy with the libraries and dynamically switch between EGL- and GLFW-friendly graphics libraries.


Sadly, I haven’t been able to load my docs to yet, because of difficulties over importing the original MuJoCo headers on their servers (suggestions welcome). However, if you wish to build the docs yourself, the following commands should do it for you:

cd /path/to/cloned/directory
cd docs/
make html

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mujoco, version 2.0.2
Filename, size File type Python version Upload date Hashes
Filename, size mujoco-2.0.2-cp36-cp36m-macosx_10_12_x86_64.whl (98.3 kB) File type Wheel Python version cp36 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page