尝试安装枕头、seaborn时出现“构建轮错误的要求”

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

输出显示

获取构建轮子的要求...错误 错误:子进程退出并出现错误

× 获取构建wheel的需求未成功运行。 │ 退出代码:1 ╰─>【61行输出】 介子构建系统 版本:0.62.2 源目录:/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411 构建目录:/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build 构建类型:本机构建 项目名称:SciPy 项目版本:1.9.0 主机的 C 编译器:cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)") 主机的 C 链接器:cc ld64 650.9 主机的 C++ 编译器:c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)") 主机的 C++ 链接器:c++ ld64 650.9 主机cpu系列:aarch64 主机cpu:arm64 C 编译器支持参数 -Wno-unused-but-set-variable: NO 已找到图书馆:是

  ../../meson.build:41:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['g95']]
  The following exception(s) were encountered:
  Running "gfortran --version" gave "[Errno 2] No such file or directory: 'gfortran'"
  Running "gfortran -V" gave "[Errno 2] No such file or directory: 'gfortran'"
  Running "flang --version" gave "[Errno 2] No such file or directory: 'flang'"
  Running "flang -V" gave "[Errno 2] No such file or directory: 'flang'"
  Running "nvfortran --version" gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running "nvfortran -V" gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running "pgfortran --version" gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running "pgfortran -V" gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running "ifort --version" gave "[Errno 2] No such file or directory: 'ifort'"
  Running "ifort -V" gave "[Errno 2] No such file or directory: 'ifort'"
  Running "g95 --version" gave "[Errno 2] No such file or directory: 'g95'"
  Running "g95 -V" gave "[Errno 2] No such file or directory: 'g95'"
  
  A full log can be found at /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build/meson-logs/meson-log.txt
  + meson setup --native-file=/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/Library/Frameworks/Python.framework/Versions/3.10 /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411 /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 909, in get_requires_for_build_wheel
      with _project(config_settings) as project:
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
      return next(self.gen)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 888, in _project
      with Project.with_temp_working_dir(
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
      return next(self.gen)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 547, in with_temp_working_dir
      yield cls(source_dir, tmpdir, build_dir)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 463, in __init__
      self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 494, in _configure
      self._meson(
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 477, in _meson
      return self._proc('meson', *args)
    File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 472, in _proc
      subprocess.check_call(list(args))
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/Library/Frameworks/Python.framework/Versions/3.10', '/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411', '/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build']' returned non-zero exit status 1.
  [end of output]

我该如何解决?

python scipy python-imaging-library metadata
3个回答
5
投票

您似乎缺少

gfortran
用于安装 scipy 的 fortran 编译器。尝试从这里安装gfortran。

如果这没有帮助,您可以从这里安装 scipy。然后运行

pip install filename.whl
安装该软件包。

或者尝试 scipy 网站上列出的不同安装方法。


2
投票

看起来您使用的是 Mac。使用自制软件安装 gcc:

brew install gcc
帮我解决了问题。


0
投票

只需执行一个

brew install scipy
,它主要解决您的其他安装问题。

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