[Neurodebian-users] issue with python-sklearn: ImportError: cannot import name parallel

Gael Varoquaux gael.varoquaux at normalesup.org
Sun Oct 23 17:10:27 UTC 2016


Standard problem with debian replacing our joblib copy by an import,
which then creates bug in scikit-learn.

I've created a PR in scikit-learn to fix that:
https://github.com/scikit-learn/scikit-learn/pull/7731

Gaël



On Sun, Oct 23, 2016 at 06:34:49PM +0200, Emanuele Olivetti wrote:
> Hi NeuroDebian Masters!

> I am playing with scikit-learn for Ubuntu 14.04, from the NeuroDebian repository:
> ----
> > apt-cache show python-sklearn
> Package: python-sklearn
> Source: scikit-learn
> Version: 0.17.1-1~nd14.04+1
> Architecture: all
> Maintainer: NeuroDebian Maintainers <team at neuro.debian.net>
> [...]
> ----

> Unfortunately I experience the following issue: sklearn cannot find joblib
> even though it is installed:
> ----
> > python
> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
> [GCC 4.8.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sklearn
> >>> sklearn.__file__
> '/usr/lib/python2.7/dist-packages/sklearn/__init__.pyc'
> >>> sklearn.__version__
> '0.17.1'
> >>> import sklearn.neighbors
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/dist-packages/sklearn/neighbors/__init__.py",
> line 9, in <module>
>     from .graph import kneighbors_graph, radius_neighbors_graph
>   File "/usr/lib/python2.7/dist-packages/sklearn/neighbors/graph.py", line
> 9, in <module>
>     from .base import KNeighborsMixin, RadiusNeighborsMixin
>   File "/usr/lib/python2.7/dist-packages/sklearn/neighbors/base.py", line
> 18, in <module>
>     from ..metrics import pairwise_distances
>   File "/usr/lib/python2.7/dist-packages/sklearn/metrics/__init__.py", line
> 33, in <module>
>     from . import cluster
>   File
> "/usr/lib/python2.7/dist-packages/sklearn/metrics/cluster/__init__.py", line
> 19, in <module>
>     from .unsupervised import silhouette_samples
>   File
> "/usr/lib/python2.7/dist-packages/sklearn/metrics/cluster/unsupervised.py",
> line 10, in <module>
>     from ..pairwise import pairwise_distances
>   File "/usr/lib/python2.7/dist-packages/sklearn/metrics/pairwise.py", line
> 27, in <module>
>     from ..externals.joblib import parallel
> ImportError: cannot import name parallel
> >>> import joblib
> >>> joblib.__version__
> '0.10.2'
> ----

> May this be a packaging problem?

> Best,

> Emanuele


> _______________________________________________
> Neurodebian-users mailing list
> Neurodebian-users at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/neurodebian-users

-- 
    Gael Varoquaux
    Researcher, INRIA Parietal
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    Phone:  ++ 33-1-69-08-79-68
    http://gael-varoquaux.info            http://twitter.com/GaelVaroquaux



More information about the Neurodebian-users mailing list