Skip to content

Can't verify installation when building from source #237

@shrimo-d

Description

@shrimo-d

Following the installation steps "From Source" as described in the README fails at step 7 (Verify installation (and download Menagerie): python -c "import mujoco_playground")

Doing so yields an AttributeError:

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File ".../mujoco_playground/mujoco_playground/__init__.py", line 16, in <module>
    from mujoco_playground._src import dm_control_suite

  File ".../mujoco_playground/mujoco_playground/_src/dm_control_suite/__init__.py", line 22, in <module>
    from mujoco_playground._src import mjx_env

  File ".../mujoco_playground/mujoco_playground/_src/mjx_env.py", line 28, in <module>
    from mujoco import mjx

  File ".../mujoco_playground/.venv/lib/python3.11/site-packages/mujoco/mjx/__init__.py", line 18, in <module>
    from mujoco.mjx._src.collision_driver import collision

  File ".../mujoco_playground/.venv/lib/python3.11/site-packages/mujoco/mjx/_src/collision_driver.py", line 47, in <module>
    from mujoco.mjx._src import support

  File ".../mujoco_playground/.venv/lib/python3.11/site-packages/mujoco/mjx/_src/support.py", line 25, in <module>
    from mujoco.mjx._src import scan

  File ".../mujoco_playground/.venv/lib/python3.11/site-packages/mujoco/mjx/_src/scan.py", line 22, in <module>
    from mujoco.mjx._src.types import JointType

  File ".../mujoco_playground/.venv/lib/python3.11/site-packages/mujoco/mjx/_src/types.py", line 84, in <module>
    class EnableBit(enum.IntFlag):

  File ".../mujoco_playground/.venv/lib/python3.11/site-packages/mujoco/mjx/_src/types.py", line 95, in EnableBit
    SLEEP = mujoco.mjtEnableBit.mjENBL_SLEEP

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

AttributeError: type object 'mujoco._enums.mjtEnableBit' has no attribute 'mjENBL_SLEEP'

This problem stems from mujoco-mjx. I guess some changes were done, that aren't working properly, so I tried to change the dependencies in the pyproject.toml file to include a previous version of mujoco and mujoco-mjx, but it resulted in:

Because only mujoco-mjx==3.3.8 is available and mujoco-mjx==3.3.8 depends on mujoco>=3.3.8.dev0, we can conclude that all
      versions of mujoco-mjx depend on mujoco>=3.3.8.dev0.
      And because playground==0.0.5 depends on mujoco-mjx and mujoco>=3.3.6.dev0,<3.3.8, we can conclude that playground==0.0.5 cannot
      be used.
      And because only playground[all]==0.0.5 is available and you require playground[all], we can conclude that your requirements
      are unsatisfiable.

Any help would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions