Skip to content

Impossible to reproduce simple example with Gymnasium #165

@liar666

Description

@liar666

Describe the bug

I cannot run the "gym" example from the examples/ dir of mushroomrl:
https://github.com/MushroomRL/mushroom-rl/blob/dev/examples/gym_recurrent_ppo.py

I get Error:

Traceback (most recent call last):
  File "<string>", line 17, in __PYTHON_EL_eval
  File "/home/user/expl_from_lib.py", line 11, in <module>
    from mushroom_rl.environments import Gymnasium
ImportError: cannot import name 'Gymnasium' from 'mushroom_rl.environments' (/home/user/venv/lib/python3.11/site-packages/mushroom_rl/environments/__init__.py)

I have latest Gymnasium and MushroomRL libs installed:

$ pip freeze | grep -E '(ymn|ushro)'
gymnasium==1.2.2
mushroom-rl==1.10.2

To Reproduce

Expected behavior

Examples from the library should work out-of-the-box (aren't they part of the Unit Test suite?)

System information (please complete the following information):

  • OS: LMDE 6
  • Python version Python 3.11.2
  • Torch version 2.5.1
  • Mushroom version 1.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions