Hello, just installed gym with atari support and ran the most basic example I could think of:
import gym
env = gym.make("Pong-v0")
observation = env.reset()
for _ in range(1000):
env.render()
action = env.action_space.sample() # your agent here (this takes random actions)
observation, reward, done, info = env.step(action)
and this threw the Error:
AttributeError: 'ALEInterface' object has no attribute 'getScreenRGB2'
I physically changed line 86 in gym/gym/envs/atari/atari_env.py from
return self.ale.getScreenRGB2()
to
return self.ale.getScreenRGB()
but that throws a segmentation fault.
I am running osx 10.11.6
Any ideas?
You have an older version of atari-py. pip install --upgrade atari-py.
Updated atari-py-0.0.18 to atari-py-0.0.21 and the issue is resolved. I wonder why the setup.py didn't flag the mismatch?
Just to be complete: I git cloned the repo and used
pip install -e .
to install.
Atari is an optional dependency of gym -- it's only installed with pip install -e .[atari].
How about on windows 10? I'm using Windows 10 with anaconda. I tried most of things to upgrade atari-py but didn't work. any suggestions for anaconda prompt?? Having same error as question on the top page.
@cws777 You have an obsolete version of atari-py.
$ pip install --upgrade atari-py.
to fix.
Most helpful comment
You have an older version of atari-py.
pip install --upgrade atari-py.