gpt4 book ai didi

python - 无法安装 scikits.sparse - Clang 错误

转载 作者:行者123 更新时间:2023-11-30 23:32:19 25 4
gpt4 key购买 nike

我在使用 django 时遇到以下错误:

Exception Type: ImportError
Exception Value: No module named sparse

导入错误来自:

from sklearn.svm.sparse import LinearSVC
from nltk.classify.scikitlearn import SklearnClassifier

为了解决这个问题,我尝试通过以下方式安装 scikit-learn 的稀疏模块:

sudo easy_install scikits.sparse

但我收到此错误:

no previously-included directories found matching 'doc/_build'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
clang: error: no such file or directory: 'scikits/sparse/cholmod.c'
clang: error: no input files
error: Setup script exited with error: command 'clang' failed with exit status 1

如何解决这个问题?

谢谢。

最佳答案

改变

from sklearn.svm.sparse import LinearSVC

from sklearn.svm import LinearSVC

忘记scikits.sparse,它与 scikit-learn 无关。 sklearn.svm.sparse 模块已在几个版本前从 scikit-learn 中删除。

关于python - 无法安装 scikits.sparse - Clang 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19456999/

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