Farama-Foundation / Arcade-Learning-Environment

The Arcade Learning Environment (ALE) -- a platform for AI research.
GNU General Public License v2.0
2.12k stars 420 forks source link

RuntimeError: Failed to initialize SDL #466

Closed youneskamel closed 2 years ago

youneskamel commented 2 years ago

I used pip install gym[atari] to install the ALE on a machine from a could computing service provider. However I am unable to run my code using the Atari library, this is the error message I get :

File "/home/paperspace/.local/lib/python3.8/site-packages/gym/envs/atari/environment.py", line 196, in seed self.ale.loadROM(getattr(roms, self._game)) RuntimeError: Failed to initialize SDL I had no issues installing and running ALE on my local machine but somehow it doesn't work on the remote machine. Could use a helping hand, please. :pray:

youneskamel commented 2 years ago

I found the problem. I was trying to execute the code on a remote computer trough ssh but my "render_mode" option was set to "human". So open AI gym was trying to render but it couldn't because it's a remote computer and I only had access to the terminal. When running the code on a remote computer trough ssh make sure "render_mode" is not set to "human".

VolkerFelix commented 9 months ago

Or you get the Forward X11 to run - then it also works with "human" render mode.