程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

正在准备元数据(pyproject.toml)...错误(错误:subprocess-exited-with-error)

发布于2023-10-27 21:44     阅读(3681)     评论(0)     点赞(5)     收藏(4)


我正在尝试使用 python 3.12.0 在 Windows 11 中安装某些依赖项,例如 scipy==1.9.3、scikit-learn==1.2.0、transformers==4.25.1 和 Gunicorn==21.2.0和 pip 23.3.1,但我遇到以下错误:

C:\Users\Vahab>pip install scipy==1.9.3
Collecting scipy==1.9.3
  Using cached scipy-1.9.3.tar.gz (42.1 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
  ╰─> [37 lines of output]
      + meson setup C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234 C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg\meson-python-native-file.ini
      The Meson build system
      Version: 1.2.3
      Source dir: C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234
      Build dir: C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg
      Build type: native build
      Project name: SciPy
      Project version: 1.9.3
      Activating VS 17.7.5
      C compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
      C linker for the host machine: link link 14.37.32825.0
      C++ compiler for the host machine: cl (msvc 19.37.32825 "Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64")
      C++ linker for the host machine: link link 14.37.32825.0
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Compiler for C supports arguments -Wno-unused-but-set-variable: NO
      Compiler for C supports arguments -Wno-unused-but-set-variable: NO (cached)
      Compiler for C supports arguments -Wno-unused-function: NO
      Compiler for C supports arguments -Wno-conversion: NO
      Compiler for C supports arguments -Wno-misleading-indentation: NO
      Compiler for C supports arguments -Wno-incompatible-pointer-types: NO
      Library m found: NO

      ..\meson.build:57:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
      The following exception(s) were encountered:
      Running `ifort --version` gave "[WinError 2] The system cannot find the file specified"
      Running `ifort -V` gave "[WinError 2] The system cannot find the file specified"
      Running `gfortran --version` gave "[WinError 2] The system cannot find the file specified"
      Running `gfortran -V` gave "[WinError 2] The system cannot find the file specified"
      Running `flang --version` gave "[WinError 2] The system cannot find the file specified"
      Running `flang -V` gave "[WinError 2] The system cannot find the file specified"
      Running `pgfortran --version` gave "[WinError 2] The system cannot find the file specified"
      Running `pgfortran -V` gave "[WinError 2] The system cannot find the file specified"
      Running `g95 --version` gave "[WinError 2] The system cannot find the file specified"
      Running `g95 -V` gave "[WinError 2] The system cannot find the file specified"

      A full log can be found at C:\Users\Vahab\AppData\Local\Temp\pip-install-vzr05y28\scipy_fb7ecadda56946cea769390c8e3e8234\.mesonpy-q52e28dg\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.

解决方案


可能永远不会有针对 cp312 发布的 1.9.3 版本的 scipy 轮子。不过,scipy-1.11.3-cp312-cp312-win_amd64.whl PyPI 上有可用的(9 月 23 日发布)。

如果您愿意使用 cp311,则可以使用 1.9.3。但是,如果您确实必须使用 cp312,那么您将需要使用更新的 scipy 版本。

我不认为 scipy==1.9.3 会在 cp312 上构建+通过测试,我不会进一步尝试构建它。



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:https://www.pythonheidong.com/blog/article/2034584/d09bd770828dae2dd75b/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

5 0
收藏该文
已收藏

评论内容:(最多支持255个字符)