gpt4 book ai didi

python - 导入环境 OpenAI Gym 时出错

转载 作者:行者123 更新时间:2023-12-04 17:11:04 27 4
gpt4 key购买 nike

我正在尝试运行 OpenAI Gym 环境,但是出现以下错误:

import gym
env = gym.make('Breakout-v0')
错误
/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
A.L.E: 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

关于python - 导入环境 OpenAI Gym 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69442971/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com