ryanrudes / renderlab

Render Gymnasium environments in Google Colaboratory
MIT License
17 stars 3 forks source link

Does Renderlab works with Gymnasium Atari Environment ? #3

Closed gusdelact closed 10 months ago

gusdelact commented 1 year ago

I tried to use ALE/AirRaid-v5 environment

This exception raised: NamespaceNotFound: Namespace ALE not found. Have you installed the proper package for ALE?


NamespaceNotFound Traceback (most recent call last) in <cell line: 1>() ----> 1 env = gym.make("ALE/AirRaid-v5", render_mode="rgbarray") 2 env = rl.RenderFrame(env, "./output") 3 observation, info = env.reset(seed=42) 4 for in range(1000): 5 action = env.action_space.sample() # this is where you would insert your policy

4 frames /usr/local/lib/python3.10/dist-packages/gymnasium/envs/registration.py in _check_namespace_exists(ns) 358 suggestion_msg = f"Have you installed the proper package for {ns}?" 359 --> 360 raise error.NamespaceNotFound(f"Namespace {ns} not found. {suggestion_msg}") 361 362

ryanrudes commented 10 months ago

As the exception suggests, you must install the ALE package in order to use the ROM files for these Atari environments. This is done automatically if you include the accept-rom-license flag in your installation of gymnasium

pip install gymnasium[atari, accept-rom-licesnse]