python:Scipy错误:3.8-alpine3.11-未找到lapack / blas资源

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

我正在尝试在python:3.8-alpine3.11中安装scipy,但得到“未找到lapack / blas资源。”对于alpien3.10来说运行良好。

Below are the logs:



Step 5/28 : RUN    pip3 install numpy==1.14.3
 ---> Using cache
 ---> f77d037c9008
Step 6/28 : RUN    pip3 install scipy==1.3.1
 ---> Running in 86d118b54acc
Looking in indexes: simple
Collecting scipy==1.3.1
  Downloading scipy-1.3.1.tar.gz (23.6 MB)
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'

获得构建车轮的要求:已开始获取构建车轮的要求:状态为“完成”准备砂轮元数据:已开始准备车轮元数据:状态为“错误”错误:命令错误,退出状态为1:命令:/usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel / tmp / tmp1qlw5c3zCWD:/ tmp / pip-install-cz2mzto6 / scipy完整输出(150行):lapack_opt_info:lapack_mkl_info:自定义UnixCCompiler在['/ usr / local / lib','/ usr / lib','/ usr / lib /']中找不到库mkl_rt不可用

openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC

creating /tmp/tmphgxupjii/tmp
creating /tmp/tmphgxupjii/tmp/tmphgxupjii
compile options: '-c'
gcc: /tmp/tmphgxupjii/source.c
gcc /tmp/tmphgxupjii/tmp/tmphgxupjii/source.o -L/usr/lib -lopenblas -o /tmp/tmphgxupjii/a.out
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/tmphgxupjii/tmp/tmphgxupjii/source.o: in function `main':
/tmp/tmphgxupjii/source.c:4: undefined reference to `zungqr_'
collect2: error: ld returned 1 exit status
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/tmphgxupjii/tmp/tmphgxupjii/source.o: in function `main':
/tmp/tmphgxupjii/source.c:4: undefined reference to `zungqr_'
collect2: error: ld returned 1 exit status
  NOT AVAILABLE

openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
  libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
  libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries tatlas,tatlas not found in /usr/lib/
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
customize UnixCCompiler
  libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries satlas,satlas not found in /usr/lib/
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
customize UnixCCompiler
  libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
  libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
  libraries f77blas,cblas,atlas not found in /usr/lib/
customize UnixCCompiler
  libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

lapack_info:
customize UnixCCompiler
  libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
  NOT AVAILABLE

lapack_src_info:
  NOT AVAILABLE

  NOT AVAILABLE

setup.py:386: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-oeuez3h_'), proceeding with generating Cython sources and expanding templates
  warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from scipy source directory.
/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:624: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  self.calc_info()
/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:624: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  self.calc_info()
/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:624: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  self.calc_info()
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
    main()
  File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
  File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
    self.run_setup()
  File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 242, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 505, in <module>
    setup_package()
  File "setup.py", line 501, in setup_package
    setup(**metadata)
  File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/core.py", line 135, in setup
    config = configuration()
  File "setup.py", line 403, in configuration
    raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
----------------------------------------

错误:命令错误,退出状态为1:/usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel / tmp / tmp1qlw5c3z检查日志用于完整的命令输出。命令“ / bin / sh -c pip3 install scipy == 1.3.1”返回了非零代码:1

python-3.x alpine
1个回答
0
投票

我后来使用了apk add py3-scipy,并且有效。

pip install scipy由于缺少lapack软件包而在高山中引发错误。py3-scipy与所有依赖包一起安装。

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