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

Emanuele Olivetti emanuele at relativita.com
Sun Oct 23 16:34:49 UTC 2016


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




More information about the Neurodebian-users mailing list