无法解析 vswhere.exe 输出——我做错了什么?

问题描述 投票:0回答:1

我尝试过

pip install -r requirements_versions.txt
,但我不断收到此错误。说实话,我对 python 或编程了解不多,所以如果答案很明显,请原谅我。非常感谢您的回答!

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      + meson setup C:\Users\bagda\AppData\Local\Temp\pip-install-hvxifhen\scipy_ca2dfa1f687847469b8b0ab23841fd31 C:\Users\bagda\AppData\Local\Temp\pip-install-hvxifhen\scipy_ca2dfa1f687847469b8b0ab23841fd31\.mesonpy-2yqzcl_i -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\bagda\AppData\Local\Temp\pip-install-hvxifhen\scipy_ca2dfa1f687847469b8b0ab23841fd31\.mesonpy-2yqzcl_i\meson-python-native-file.ini
      The Meson build system
      Version: 1.3.0
      Source dir: C:\Users\bagda\AppData\Local\Temp\pip-install-hvxifhen\scipy_ca2dfa1f687847469b8b0ab23841fd31
      Build dir: C:\Users\bagda\AppData\Local\Temp\pip-install-hvxifhen\scipy_ca2dfa1f687847469b8b0ab23841fd31\.mesonpy-2yqzcl_i
      Build type: native build
      Project name: SciPy
      Project version: 1.9.3
      WARNING: Failed to activate VS environment: Could not parse vswhere.exe output

      ..\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\bagda\AppData\Local\Temp\pip-install-hvxifhen\scipy_ca2dfa1f687847469b8b0ab23841fd31\.mesonpy-2yqzcl_i\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.
python pip
1个回答
0
投票

您很可能缺少 C++ 编译器

使用 C++ 工作负载安装 Visual Studio 将修复此错误。

见下图:

https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170

© www.soinside.com 2019 - 2024. All rights reserved.