takuseno / d4rl-atari

Datasets for data-driven deep reinforcement learning with Atari (wrapper for datasets released by Google)
MIT License
101 stars 14 forks source link

UnregisteredEnv: No registered env with id: BreakoutNoFrameskip-v4 #8

Closed JayanthRR closed 2 years ago

JayanthRR commented 2 years ago

I get environment not registered error for this block of code. I installed d3rlpy first and then installed d4rl-atari. Is there something that I missed during installation? Thanks in advance.

import gym
import d4rl_atari

env = gym.make('breakout-mixed-v0') # -v{0, 1, 2, 3, 4} for datasets with the other random seeds
takuseno commented 2 years ago

@JayanthRR Hello, thanks for the issue. This is because of the recent changes made in gym side. Currently, the Atari environments have been removed from gym repository. https://github.com/openai/gym/blob/v0.21.0/gym/envs/__init__.py

Instead, you can downgrade the gym version to0.20.0. https://github.com/openai/gym/blob/a7b6462136ebaa610c8941e4da8a9c92155b04d1/gym/envs/__init__.py#L646

If you have further issues, please let me know.

JayanthRR commented 2 years ago

I see. I downgraded by changing the gym version in setup.py as follows instead of 0.20.0 and it works.

      install_requires=["atari-py", "gym[atari]==0.19", "gsutil", "numpy", "opencv-python"]

Note: I tried it with 0.20.0 but I get the following error

AttributeError: module 'ale_py.gym' has no attribute 'ALGymEnv'