问题描述
AttributeError: module ‘gym.envs.box2d’ has no attribute ‘LunarLander’
参考链接
pip install swig
pip install box2d box2d-kengz
先按照上述博客安装swig
在安装pip install box2d box2d-kengz 时依然报错
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for box2d-kengz
Running setup.py clean for box2d-kengz
Failed to build box2d-kengz
ERROR: Could not build wheels for box2d-kengz, which is required to install pyproject.toml-based projects
解决方案:
换成这样成功!
pip3 install Box2D
注意名称大小写(Box2D)