script fails with sci-libs/scikits_learn
wmyrda opened this issue · 1 comments
wmyrda commented
easylist_pac.py says it is better to use scikits_learn
to achieve better script effects
No module named 'sklearn'
easylist_pac.py:32: UserWarning: Install scikit-learn for more accurate EasyList rule selection.
warnings.warn("Install scikit-learn for more accurate EasyList rule selection.")
When I installed it script has failed for me regardless of the version of scikits_learn
used.
Fail with sci-libs/scikits_learn-0.17.1
Traceback (most recent call last):
File "easylist_pac.py", line 27, in <module>
from sklearn.linear_model import LogisticRegression
File "/usr/lib64/python3.5/site-packages/sklearn/linear_model/__init__.py", line 15, in <module>
from .least_angle import (Lars, LassoLars, lars_path, LarsCV, LassoLarsCV,
File "/usr/lib64/python3.5/site-packages/sklearn/linear_model/least_angle.py", line 19, in <module>
from scipy import linalg, interpolate
File "/usr/lib64/python3.5/site-packages/scipy/interpolate/__init__.py", line 175, in <module>
from .interpolate import *
File "/usr/lib64/python3.5/site-packages/scipy/interpolate/interpolate.py", line 32, in <module>
from .interpnd import _ndim_coords_from_arrays
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd
File "/usr/lib64/python3.5/site-packages/scipy/spatial/__init__.py", line 95, in <module>
from .qhull import *
File "qhull.pyx", line 2155, in init scipy.spatial.qhull
AttributeError: 'cython_function_or_method' object has no attribute '__func__'
Fail with sci-libs/scikits_learn-0.18.2-r1
Traceback (most recent call last):
File "easylist_pac.py", line 27, in <module>
from sklearn.linear_model import LogisticRegression
File "/usr/lib64/python3.5/site-packages/sklearn/__init__.py", line 57, in <module>
from .base import clone
File "/usr/lib64/python3.5/site-packages/sklearn/base.py", line 12, in <module>
from .utils.fixes import signature
File "/usr/lib64/python3.5/site-packages/sklearn/utils/__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "/usr/lib64/python3.5/site-packages/sklearn/utils/validation.py", line 18, in <module>
from ..utils.fixes import signature
File "/usr/lib64/python3.5/site-packages/sklearn/utils/fixes.py", line 403, in <module>
from scipy.stats import rankdata
File "/usr/lib64/python3.5/site-packages/scipy/stats/__init__.py", line 343, in <module>
from .stats import *
File "/usr/lib64/python3.5/site-packages/scipy/stats/stats.py", line 171, in <module>
from . import distributions
File "/usr/lib64/python3.5/site-packages/scipy/stats/distributions.py", line 10, in <module>
from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,
File "/usr/lib64/python3.5/site-packages/scipy/stats/_distn_infrastructure.py", line 16, in <module>
from scipy.misc import doccer
File "/usr/lib64/python3.5/site-packages/scipy/misc/__init__.py", line 67, in <module>
from scipy.interpolate._pade import pade as _pade
File "/usr/lib64/python3.5/site-packages/scipy/interpolate/__init__.py", line 175, in <module>
from .interpolate import *
File "/usr/lib64/python3.5/site-packages/scipy/interpolate/interpolate.py", line 32, in <module>
from .interpnd import _ndim_coords_from_arrays
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd
File "/usr/lib64/python3.5/site-packages/scipy/spatial/__init__.py", line 95, in <module>
from .qhull import *
File "qhull.pyx", line 2155, in init scipy.spatial.qhull
AttributeError: 'cython_function_or_method' object has no attribute '__func__'
Fail with sci-libs/scikits_learn-0.19.0
Traceback (most recent call last):
File "easylist_pac.py", line 27, in <module>
from sklearn.linear_model import LogisticRegression
File "/usr/lib64/python3.5/site-packages/sklearn/linear_model/__init__.py", line 12, in <module>
from .base import LinearRegression
File "/usr/lib64/python3.5/site-packages/sklearn/linear_model/base.py", line 38, in <module>
from ..preprocessing.data import normalize as f_normalize
File "/usr/lib64/python3.5/site-packages/sklearn/preprocessing/__init__.py", line 8, in <module>
from .data import Binarizer
File "/usr/lib64/python3.5/site-packages/sklearn/preprocessing/data.py", line 18, in <module>
from scipy import stats
File "/usr/lib64/python3.5/site-packages/scipy/stats/__init__.py", line 343, in <module>
from .stats import *
File "/usr/lib64/python3.5/site-packages/scipy/stats/stats.py", line 171, in <module>
from . import distributions
File "/usr/lib64/python3.5/site-packages/scipy/stats/distributions.py", line 10, in <module>
from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,
File "/usr/lib64/python3.5/site-packages/scipy/stats/_distn_infrastructure.py", line 16, in <module>
from scipy.misc import doccer
File "/usr/lib64/python3.5/site-packages/scipy/misc/__init__.py", line 67, in <module>
from scipy.interpolate._pade import pade as _pade
File "/usr/lib64/python3.5/site-packages/scipy/interpolate/__init__.py", line 175, in <module>
from .interpolate import *
File "/usr/lib64/python3.5/site-packages/scipy/interpolate/interpolate.py", line 32, in <module>
from .interpnd import _ndim_coords_from_arrays
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd
File "/usr/lib64/python3.5/site-packages/scipy/spatial/__init__.py", line 95, in <module>
from .qhull import *
File "qhull.pyx", line 2155, in init scipy.spatial.qhull
AttributeError: 'cython_function_or_method' object has no attribute '__func__'
Just in case this might be importabt due to https://bugs.gentoo.org/630294 I installed scikits_learn with the use of sci-libs/gsl-2.4 instead of reference.
eselect cblas list
Installed CBLAS for library directory lib64
[1] gsl *
[2] reference
essandess commented
That’s a python library config issue on your box.