Estoy tratando de ejecutar un entorno OpenAI Gym, pero aparece el siguiente error:
import gym env = gym.make('Breakout-v0')ERROR
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ale_py/gym/environment.py:11: DeprecationWarning: Importing atari-py roms won't be supported in future releases of ale-py. import ale_py.roms as roms ALE: Arcade Learning Environment (version +a54a328) [Powered by Stella] Traceback (most recent call last): File "/Users/username/Desktop/OpenAI Gym Stuff/OpenAI_Exp.py", line 2, in <module> env = gym.make('Breakout-v0') File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gym/envs/registration.py", line 200, in make return registry.make(id, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gym/envs/registration.py", line 105, in make env = spec.make(**kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/gym/envs/registration.py", line 75, in make env = cls(**_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ale_py/gym/environment.py", line 123, in __init__ self.seed() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ale_py/gym/environment.py", line 171, in seed raise error.Error( gym.error.Error: Unable to find game "Breakout", did you import Breakout with ale-import-roms?pip install gym[atari,accept-rom-license]==0.21.0
Se puede resolver con conda:
instalar gimnasio versión 0.19.0, por,
conda install -c conda-forge gym=0.19.0;instalar atari_py por
conda install -c conda-forge atari_py;Descarga los Roms y descomprime el RAR.
abra una terminal, active su entorno e ingrese:
python -m atari_py.import_roms \<path to folder\>,que copiará las ROM en la carpeta especificada en la carpeta pkg.
Esto funcionó para mí a través de la terminal:
pip install gym[atari] pip install autorom[accept-rom-license]Después de instalar el gimnasio, son 80 juegos. Después de instalar gym[atari], son 267 juegos. Y tienes que aceptar las licencias específicas para activar juegos adicionales.