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

查看:105
本文介绍了编译 python 3.8.7, numpy 1.19 和 scipy WITHOUT lapack, blas from source的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢从头开始编译python 3.8.7并添加numpy、scipy.Python 编译得很好,numpy 也是如此(禁用 LAPACK=None、BLAS=None、ATLAS=None).如果我编译 scipy,我会遇到以下错误:

文件scipy/linalg/setup.py",第20行,配置中raise NotFoundError('没有找到 lapack/blas 资源')numpy.distutils.system_info.NotFoundError:未找到 lapack/blas 资源

我故意不想要 LAPACK、BLAS、ATLAS 依赖项!

有没有办法禁用这些库?

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无"setenv ATLAS无"setenv LAPACK 无"setenv NPY_BLAS_ORDER "";setenv NPY_LAPACK_ORDER "";${PYHOME}/bin/python3 setup.py 构建${PYHOME}/bin/python3 setup.py install --prefix=${PYHOME}

解决方案

文档 说:

<块引用>

在构建之前,您还需要安装 NumPy 和 SciPy 依赖的包

<块引用>

BLAS 和 LAPACK 库(可选但强烈推荐用于 NumPy,SciPy 需要):通常是 ATLAS + OpenBLAS 或 MKL.

I like to compile python 3.8.7 from scratch and add numpy, scipy. Python compiles fine, numpy as well (disabled LAPACK=None, BLAS=None, ATLAS=None). If i compile scipy i run into the following error:

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!

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

BLAS and LAPACK libraries (optional but strongly recommended for NumPy, required for SciPy): typically ATLAS + OpenBLAS, or MKL.

这篇关于编译 python 3.8.7, numpy 1.19 和 scipy WITHOUT lapack, blas from source的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆