成功安装/illumina/thirdparty/python/python-2.7.5/bin/pip2.7安装-U scikit-learn后,启动回归分析时出现问题。
from sklearn import linear_model
给出了
File "/illumina/thirdparty/python/python-2.7.5/lib/python2.7/site-packages/sklearn/linear_model/__init__.py", line 25, in <module>
from .logistic import (LogisticRegression, LogisticRegressionCV,
File "/illumina/thirdparty/python/python-2.7.5/lib/python2.7/site-packages/sklearn/linear_model/logistic.py", line 23, in <module>
from ..svm.base import _fit_liblinear
File "/illumina/thirdparty/python/python-2.7.5/lib/python2.7/site-packages/sklearn/svm/__init__.py", line 13, in <module>
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC, \
File "/illumina/thirdparty/python/python-2.7.5/lib/python2.7/site-packages/sklearn/svm/classes.py", line 4, in <module>
from .base import _fit_liblinear, BaseSVC, BaseLibSVM
File "/illumina/thirdparty/python/python-2.7.5/lib/python2.7/site-packages/sklearn/svm/base.py", line 8, in <module>
from . import libsvm, liblinear
ImportError: /illumina/thirdparty/python/python-2.7.5/lib/python2.7/site-packages/sklearn/svm/libsvm.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_inf
似乎问题与libsvm一样,因为from sklearn import datasets
效果很好。
任何建议都将非常受欢迎。
环境:
答案 0 :(得分:1)
这显然是ABI不匹配。您可能不自觉地使用链接到本地库的python模块,该库应该是不同的版本。确保在运行python时系统只能找到一个libsvm。
答案 1 :(得分:0)