gpt4 book ai didi

python - scikit-learn 加载失败

转载 作者:太空宇宙 更新时间:2023-11-04 11:25:45 25 4
gpt4 key购买 nike

我使用 pip install scikit-learn 安装了 scikit-learn 0.13。

from sklearn import svm, metrics

失败

from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC
from ..linear_model.base import LinearClassifierMixin
from .base import LinearRegression
from .cd_fast import sparse_std
ImportError: sklearn/linear_model/cd_fast.so: undefined symbol: ATL_dcopy

NumPy 和 SciPy 似乎没有问题(test() 通过),版本为 1.7.0 和 0.11.0,从源安装。机器上安装了最新的 ATLAS 3.10.1,也是来自源。

$ uname -a
Linux hostname 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux

$ python --version
Python 2.6.6

最佳答案

编译时加入atlas lib,问题解决。通过在 cblas_libs.append('m') 之前或之后添加一行来编辑文件 sklearn/linear_model/setup.py: cblas_libs.append(' map 集')

然后重建并安装 scikit-learn

关于python - scikit-learn 加载失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14861169/

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