Skip to content

use mujoco-py-cython3 to retain compatibility #1352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/environments/mujoco.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ As of October 2021, DeepMind has acquired MuJoCo and has open-sourced it in 2022
Using MuJoCo with Gymnasium requires the framework `mujoco` be installed (this dependency is installed with the above command).
Instructions for installing the MuJoCo engine can be found on their [website](https://mujoco.org) and [GitHub repository](https://github.com/deepmind/mujoco).

For MuJoCo `v3` environments and older the `mujoco-py` framework is required (`pip install gymnasium[mujoco-py]`) which can be found in the [GitHub repository](https://github.com/openai/mujoco-py/tree/master/mujoco_py).
For MuJoCo `v3` environments and older the `mujoco-py` framework is required
`pip install gymnasium[mujoco-py]` installs a fork of [mujoco-py] which works with `cython>=3.0.0` otherwise `pip install gymnasium[mujoco-py-original]` installs the original
which can be found in the [GitHub repository](https://github.com/openai/mujoco-py/tree/master/mujoco_py), but it does not work `cython>=3.0.0`.

There are eleven MuJoCo environments (in roughly increasing complexity):

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ atari = ["ale_py >=0.9"]
box2d = ["box2d-py ==2.3.5", "pygame >=2.1.3", "swig ==4.*"]
classic-control = ["pygame >=2.1.3"]
classic_control = ["pygame >=2.1.3"] # kept for backward compatibility
mujoco-py = ["mujoco-py >=2.1,<2.2", "cython<3"]
mujoco_py = ["mujoco-py >=2.1,<2.2", "cython<3"] # kept for backward compatibility
mujoco-py = ["mujoco-py-cython3"]
mujoco_py = ["mujoco-py-cython3"] # kept for backward compatibility
mujoco-py_original = ["mujoco-py >=2.1,<2.2", "cython<3"]
mujoco = ["mujoco >=2.1.5", "imageio >=2.14.1", "packaging >=23.0"]
toy-text = ["pygame >=2.1.3"]
toy_text = ["pygame >=2.1.3"] # kept for backward compatibility
Expand All @@ -59,8 +60,7 @@ all = [
# classic-control
"pygame >=2.1.3",
# mujoco-py
"mujoco-py >=2.1,<2.2",
"cython <3",
"mujoco-py-cython3",
# mujoco
"mujoco >=2.1.5",
"imageio >=2.14.1",
Expand Down
Loading