gpt4 book ai didi

python - 如何告诉 Python Atlas 的安装位置

转载 作者:太空宇宙 更新时间:2023-11-03 12:07:50 25 4
gpt4 key购买 nike

我目前正在一台没有根访问权限的计算机上安装 Python 的 scikit-learn 包。在 Fedora 14 上使用 Python 2.7。

pip 没有安装,所以我正在使用 easy_install:

easy_install --prefix=$HOME/.local -U scikit-learn

安装过程提示 BLAS 未安装。我过去曾尝试安装 scipy,但在查找和安装 Atlas/BLAS 时遇到了麻烦。从那时起,我检查了 numpy 与 Atlas 没有问题:

>>> import numpy as np
>>> np.__config__.show()
atlas_threads_info:
libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
library_dirs = ['/usr/lib/atlas']
language = f77
include_dirs = ['/usr/include']

blas_opt_info:
libraries = ['ptf77blas', 'ptcblas', 'atlas']
library_dirs = ['/usr/lib/atlas']
define_macros = [('ATLAS_INFO', '"\\"3.8.3\\""')]
language = c
include_dirs = ['/usr/include']

atlas_blas_threads_info:
libraries = ['ptf77blas', 'ptcblas', 'atlas']
library_dirs = ['/usr/lib/atlas']
language = c
include_dirs = ['/usr/include']

lapack_opt_info:
libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
library_dirs = ['/usr/lib/atlas']
define_macros = [('ATLAS_INFO', '"\\"3.8.3\\""')]
language = f77
include_dirs = ['/usr/include']

lapack_mkl_info:
NOT AVAILABLE

blas_mkl_info:
NOT AVAILABLE

mkl_info:
NOT AVAILABLE

/usr/lib/atlas 存在,并包含 .so 文件。

这是 easy_install 存在的错误:

error: Setup script exited with error: Command "gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c sklearn/__check_build/_check_build.c -o build/temp.linux-i686-2.7/sklearn/__check_build/_check_build.o" failed with exit status 1
/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py:248: RuntimeWarning: Parent module 'numpy.distutils' not found while handling absolute import
from numpy.distutils import log

以及安装早期的警告:

/usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:1392: 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.

所以安装过程似乎无法找到 numpy 或 Atlas。我如何告诉它在哪里可以找到这些?

最佳答案

我更愿意在评论中提出这个问题,但没有足够的声誉来这样做:

export ATLAS=/usr/lib/atlas/libatlas.so before easy_install 有帮助吗?

关于python - 如何告诉 Python Atlas 的安装位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22118278/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com