准备元数据(pyproject.toml)...错误

0 投票
0 回答
40 浏览
提问于 2025-04-11 23:24

我在用命令“pip install numpy”来安装NumPy这个库时,遇到了以下问题。
系统开始收集NumPy,使用的是缓存的numpy-1.26.4.tar.gz文件(大小15.8 MB)。
接着,它安装了一些构建所需的依赖项,完成了。然后,它获取了构建轮子(wheel)的要求,也完成了。接下来,它安装了一些后端依赖项,也完成了。
但是,在准备元数据(pyproject.toml)时出错了,错误信息是:子进程退出时出错。

具体来说,准备元数据的过程没有成功,退出代码是1。
系统尝试运行一个Python脚本来设置NumPy,但在执行过程中出现了问题。
这个构建系统叫做Meson,版本是1.2.99。它在一个临时文件夹中工作,项目名称是NumPy,版本是1.26.4。
有一个警告提示:无法激活Visual Studio环境,因为找不到一个叫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\Ya Zahra\AppData\Local\Temp\pip-install-9k0yru47\numpy_aa35ee8d6f314c8383668c5ac8a97aef\.mesonpy-0_r_213r\meson-logs\meson-log.txt
  [end of output]

注意:这个错误来自一个子进程,可能不是pip本身的问题。
错误信息显示,生成元数据时失败了。

我想安装NumPy模块时遇到了这个错误。不仅这个模块,所有模块都出现了这个问题。

0 个回答

暂无回答

撰写回答