Skip to content
This repository
Browse code

MISC: better check_build error reporting

  • Loading branch information...
commit ea59b840757b5849fefc2bb6f1da48dc9b712b67 1 parent 9323a22
Gael Varoquaux authored October 08, 2011

Showing 1 changed file with 13 additions and 4 deletions. Show diff stats Hide diff stats

  1. 17  sklearn/__init__.py
17  sklearn/__init__.py
@@ -15,10 +15,19 @@
15 15
 
16 16
 try:
17 17
     from . import check_build
18  
-except ImportError:
19  
-    raise ImportError("Please do not forget to build the package first: "
20  
-            "run `python setup.py install` or `make`."
21  
-        )
  18
+except ImportError, e:
  19
+    raise ImportError(
  20
+"""%s
  21
+___________________________________________________________________________
  22
+It seems that the scikit-learn has not been built correctly.
  23
+
  24
+If you have installed the scikit-learn from source, please do not forget
  25
+to build the package before using it: run `python setup.py install` or
  26
+`make` in the source directory.
  27
+
  28
+If you have used an installer, please check that it is suited for your
  29
+Python version and your OS.
  30
+""" % e)
22 31
 
23 32
 from .base import clone
24 33
 

1 note on commit ea59b84

Olivier Grisel
Owner

Thanks I was about to do the same.

Vlad Niculae

and your platform, too, maybe?

Please sign in to comment.
Something went wrong with that request. Please try again.