scikit-learn/scikit-learn — Issue #599: Error in following scikit-learn-tutorial: cannot import name sparse
Author: inverseofverse
Created: 2012-01-31 07:55:34+00:00
State: open

Hi,

I am following the scikit-learn-tutorial. I got from the beginning to section 2.2.1 (A first classifier example with scikit-learn) without any issues, but am not able to make any more progress unfortunately:

> from sklearn.svm import LinearSVC
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27-enthought\lib\site-packages\scikit_learn-0.11_git-py2.7-win-amd64.egg\sklearn\svm\__init__.py", line 15, in
from . import sparse, libsvm, liblinear
ImportError: cannot import name sparse
>

I can, however, import the sparse class directly from scipy without any issues. i.e. from scipy import sparse works fine.

I don't know how to troubleshoot this issue. Your help would be much appreciated.

My environment is Windows 7 64 bit, Enthought Python 2.7 64 bit.

Thanks!