Python运行报错:ImportError: cannot import name 'BinarySpaceToDiscreteSpaceEnv' from 'nes_py.wrappers'
运行Python项目:
https://pypi.org/project/gym-super-mario-bros/
报错:
ImportError: cannot import name 'BinarySpaceToDiscreteSpaceEnv' from 'nes_py.wrappers'
解决方法:
将
from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv
替换为:
from nes_py.wrappers import JoypadSpace as BinarySpaceToDiscreteSpaceEnv
参考:
https://github.com/uvipen/Super-mario-bros-A3C-pytorch/issues/3
https://github.com/ray075hl/PPO_super_mario/issues/1
本博客是博主个人学习时的一些记录,不保证是为原创,个别文章加入了转载的源地址,还有个别文章是汇总网上多份资料所成,在这之中也必有疏漏未加标注处,如有侵权请与博主联系。
如果未特殊标注则为原创,遵循 CC 4.0 BY-SA 版权协议。
posted on 2024-08-05 14:12 Angry_Panda 阅读(10) 评论(0) 编辑 收藏 举报