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'



image



解决方法:

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



posted on 2024-08-05 14:12  Angry_Panda  阅读(10)  评论(0编辑  收藏  举报

导航