SciPy 无法在 Mac 上根据 Intel 和 M1 Mac 上的 CPython 3.9/PyPy 从源代码构建

SciPy fails to build from source on Mac under CPython 3.9/PyPy on Intel & M1 Macs

提问人:handloomweaver 提问时间:10/4/2023 最后编辑:handloomweaver 更新时间:10/4/2023 访问量:78

问:

我在运行 Catalina 的 Intel Mac 和运行 Ventura 的 M1 Mac 上都有 virtualenvs,一位朋友在运行 Monterey 的 Intel Mac 上尝试过。

我正在遵循 scipy 文档中的源代码构建说明:

https://docs.scipy.org/doc/scipy/building/index.html 哪个状态:

xcode-select --install(确保已安装 Xcode 命令行工具)

brew install gfortran openblas pkg-config pip install scipy --no-binary scipy

https://handloomweaver.s3-eu-west-1.amazonaws.com/scipy_m1_cpy3.log [CPython 3.11 Ventura M1 Mac]

https://handloomweaver.s3-eu-west-1.amazonaws.com/scipy_m1_py3.log [PyPy 3.10 Ventura M1 Mac]

https://handloomweaver.s3-eu-west-1.amazonaws.com/intel.log [CPython 3.9 Intel Monterey]

https://handloomweaver.s3-eu-west-1.amazonaws.com/scipy_intel_cpy3.log [CPython 3.11 Intel Catalina]

你会看到,在每种情况下,即使我遵循了说明,它们也无法构建并且出于不同的原因。

总结,他们都说:

也:

../scipy/meson.build:159:9: ERROR: Dependency "OpenBLAS" not found, tried pkgconfig, framework and cmake

艺术

../../numpy/meson.build:207:4: ERROR: Problem encountered: No BLAS library detected!

艺术

../meson.build:82:0: ERROR: Unable to detect linker for compiler `gfortran -Wl,--version`

艺术

Problem with the CMake installation, aborting build. CMake executable is cmake

(最后一个是在构建 ninja .whl 时)

用于安装后端依赖项的 pip 子进程未成功运行。

如果有确切的 .whl 也没关系,但如果没有,就我而言,我正在尝试在没有 .whl 可用的 PyPy 上构建。但正如所证明的那样,这不是 M1 问题或 PyPy 问题。目前,您无法在两个不同的后端体系结构和三个不同的操作系统版本上的各种 CPython 或 PyPy 版本上从源 SciPy 进行 pip 构建。

我没有得到什么还是我应该提交一个错误?

python numpy scipy cpython pypy

评论

0赞 tadman 10/4/2023
你能在你的问题中包含相关内容作为常规文本,而不是巨大的下载链接吗?
0赞 handloomweaver 10/4/2023
我总结了每个错误中的主要错误。道歉
0赞 tadman 10/4/2023
这是否取决于 Fortran 或 BLAS?如果是这样,您可能需要安装更多(Homebrew?)依赖项。
0赞 handloomweaver 10/4/2023
根据问题,我已经安装了 docs.scipy.org 指定要做的事情:brew install gfortran openblas pkg-config,以便安装 BLAS 和 fortran
0赞 mattip 10/5/2023
显示什么?这是在从源代码构建 scipy/numpy 之前必须工作的基本部分。pkg-config openblas --modversion

答: 暂无答案