0

I installed sklearn, version: 0.19.2, but cannot import it.

Please see the errors below:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-61-b7c74cbf5af0> in <module>()
----> 1 import sklearn

c:\python27\lib\site-packages\sklearn\__init__.py in <module>()
    131     # process, as it may not be compiled yet
    132 else:
--> 133     from . import __check_build
    134     from .base import clone
    135     __check_build  # avoid flakes unused variable error

ImportError: cannot import name __check_build
Daniel Lenz
  • 3,334
  • 17
  • 36
BirdPlay6
  • 43
  • 5
  • Could you provide a few details about how you installed it (`pip`/`conda`/from source), and what your python version is? (`>>python --version`) – Daniel Lenz Sep 25 '18 at 00:40
  • @DanielLenz pip install -U scikit-learn – BirdPlay6 Sep 25 '18 at 00:41
  • Might be missing a dependency [`SciPy`](https://www.scipy.org/scipylib/index.html#). Try `pip install scipy` then re-run your module. Reference: [ImportError in importing from sklearn: cannot import name check_build](https://stackoverflow.com/questions/15274696/importerror-in-importing-from-sklearn-cannot-import-name-check-build) – chickity china chinese chicken Sep 25 '18 at 00:56
  • 1
    Possible duplicate of [ImportError in importing from sklearn: cannot import name check\_build](https://stackoverflow.com/questions/15274696/importerror-in-importing-from-sklearn-cannot-import-name-check-build) – chickity china chinese chicken Sep 25 '18 at 00:57
  • None of the solutions worked for me. I keep getting the error: – BirdPlay6 Sep 25 '18 at 02:08
  • As below: Traceback (most recent call last): File "", line 1, in import sklearn File "C:\Python27\lib\site-packages\sklearn\__init__.py", line 135 __check_build # avoid flakes unused variable error ^ IndentationError: unindent does not match any outer indentation level – BirdPlay6 Sep 25 '18 at 02:09

0 Answers0