栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【错误解决】GYM下引入Atari环境错误

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【错误解决】GYM下引入Atari环境错误

报错显示:

We're Unable to find the game "MsPacman". Note: Gym no longer distributes ROMs. If you own a license to use the necessary ROMs for research purposes you can download them via `pip install gym[accept-rom-license]`. Otherwise, you should try importing "MsPacman" via the command `ale-import-roms`. If you believe this is a mistake perhaps your copy of "MsPacman" is unsupported. To check if this is the case try providing the environment variable `PYTHonWARNINGS=default::importWarning:ale_py.roms`. For more information see: https://github.com/mgbellemare/Arcade-Learning-Environment#rom-management

解决方法:

在综合搜索之后,发现可行组合。值得一试

1.安装指定版本的gym和altari-py

pip install gym==0.19.0
pip install atari_py==0.2.6

 2.安装rom

官方参考:

https://github.com/openai/atari-py#roms

中文参考:

Exception: ROM is missing for ms_pacman, see https://github.com/openai/atari-py#roms for instruction_CSU_FuChou的博客-CSDN博客

测试代码:
import gym
#更换为所需的环境
env = gym.make("MsPacman-v0")
print(env.action_space.n)
env.render()
env.close()

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/725832.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号