**
AttributeError: module ‘gym.envs.box2d’ has no attribute ‘LunarLander’
**
解决办法:
方法一:
pip3 install box2d-py
pip3 install gym[Box_2D]
import gym
env = gym.make("LunarLander-v2")
我安装的时候出错了,输入:
pip install Box2D
成功了!
参考网址
2023-10-20 18:30:52