问题描述
今天在按照官方教程[1],使用
pip install stable-baselines3[extra]
安装stable-baseline3时,遇到了以下bug:
Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [467 lines of output]
...RuntimeError: Terminating attempt to download ROMs after 180 seconds, this has failed, please report it.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
Successfully built gym
Failed to build AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
解决方案
在参考了[2]之后,找到了该问题的解决方案:
pip install --upgrade AutoROM
AutoROM --accept-license
pip install stable-baselines3[extra]
在等待一会之后,成功安装,问题解决。