简体   繁体   English

编译 python 3.8.7, numpy 1.19 和 scipy 没有 lapack, blas 从源

[英]compile python 3.8.7, numpy 1.19 and scipy WITHOUT lapack, blas from source

I like to compile python 3.8.7 from scratch and add numpy, scipy.我喜欢从头开始编译 python 3.8.7 并添加 numpy、scipy。 Python compiles fine, numpy as well (disabled LAPACK=None, BLAS=None, ATLAS=None). Python 编译良好,numpy 也可以(禁用 LAPACK=None,BLAS=None,ATLAS=None)。 If i compile scipy i run into the following error:如果我编译 scipy 我会遇到以下错误:

File "scipy/linalg/setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

I intentionally don't want a LAPACK, BLAS, ATLAS dependency!我故意不想要 LAPACK、BLAS、ATLAS 依赖!

Is there a way of disabling these libraries?有没有办法禁用这些库?

setenv PYHOME  "/path/to/my/python"
FFI_VERSION        "3.3"
PYTHON_VERSION     "3.8.7"
CYTHON_VERSION     "0.29.21"
NUMPY_VERSION      "1.19.5"
PYBIND11_VERSION   "2.6.1"
SCIPY_VERSION      "1.5.4"

setenv BLAS             "None"
setenv ATLAS            "None"
setenv LAPACK           "None"
setenv NPY_BLAS_ORDER   ""
setenv NPY_LAPACK_ORDER ""

${PYHOME}/bin/python3 setup.py build
${PYHOME}/bin/python3 setup.py install --prefix=${PYHOME}

The documentation says: 文档说:

Before building, you will also need to install packages that NumPy and SciPy depend on在构建之前,您还需要安装 NumPy 和 SciPy 依赖的包

BLAS and LAPACK libraries (optional but strongly recommended for NumPy, required for SciPy ): typically ATLAS + OpenBLAS, or MKL. BLAS 和 LAPACK 库(可选但强烈推荐用于 NumPy,SciPy需要):通常是 ATLAS + OpenBLAS 或 MKL。

Thank you!谢谢!

setenv PYTHON_VERSION     "3.6.4"
setenv CYTHON_VERSION     "0.24.1"
setenv NUMPY_VERSION      "1.11.1"
setenv SCIPY_VERSION      "0.18.1"

this version/setup works without LAPACK etc. disabled by the LAPACK,BLAS,ATLAS=None switches.此版本/设置在 LAPACK、BLAS、ATLAS=None 开关禁用的情况下无需 LAPACK 等。 So this hard requirement of the Lapack dependence of SciPy was introduced later...所以后面介绍了SciPy的Lapack依赖这个硬性要求……

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM