安装强化学习包gym报错问题及解决方法

发布时间 2023-09-08 11:55:26作者: 欣杰科技
安装命令
pip install gymnasium[all]

如遇如下报错

error: command 'swig.exe' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for box2d-py
  Running setup.py clean for box2d-py
Failed to build box2d-py
ERROR: Could not build wheels for box2d-py, which is required to install pyproject.toml-based projects

则继续用如下安装命令

conda install swig

然后重新执行一次最上面的安装命令即可