You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法安装stable-baselines3的问题求助

无法安装stable-baselines3的问题求助

首先得说一下,我已经仔细看过两个类似的安装问题了,但我的情况好像不太一样。

我在Windows终端里执行了pip install stable-baselines3命令,结果出现了下面的错误输出:

Collecting stable-baselines3
  Using cached stable_baselines3-2.4.0-py3-none-any.whl.metadata (4.5 kB)
Requirement already satisfied: gymnasium<1.1.0,>=0.29.1 in c:\users\鈻撯枔鈻撯枔\appdata\local\programs\python\python313\lib\site-packages (from stable-baselines3) (1.0.0)
Collecting numpy<2.0,>=1.20 (from stable-baselines3)
  Using cached numpy-1.26.4.tar.gz (15.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      + C:\Users\鈻撯枔鈻撯枔\AppData\Local\Programs\Python\Python313\python.exe C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079\vendored-meson\meson\meson.py setup C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079 C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079\.mesonpy-z47mfrn8 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079\.mesonpy-z47mfrn8\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.99
      Source dir: C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079
      Build dir: C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079\.mesonpy-z47mfrn8
      Build type: native build
      Project name: NumPy
      Project version: 1.26.4
      WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

      ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
      The following exception(s) were encountered:
      Running `icl ""` gave "[WinError 2] The system cannot find the file specified"
      Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
      Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
      Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
      Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
      Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
      Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"

      A full log can be found at C:\Users\鈻撯枔鈻撯枔\AppData\Local\Temp\pip-install-9bqz2x1p\numpy_f99cc85af0fe45d7838bd88862461079\.mesonpy-z47mfrn8\meson-logs\meson-log.txt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

注意哦,之前看到的类似问题是build dependences(构建依赖)出错,但我这里是preparing metadata(准备元数据)环节出问题。而且我已经试过那个问题里提到的所有方法了——比如pip install git+https://github.com/DLR-RM/stable-baselines3、pip install stable-baselines3[extra]还有pip install git+https://github.com/carlosluis/stable-baselines3@fix_tests,结果都是一样的错误。有没有大佬能帮帮我呀?谢谢啦!

备注:内容来源于stack exchange,提问作者Wilhelm Laibach

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 17:48:02