When i run the script : python setup.py install from cmd i get the following error message :
ImportError: No module named sklearn._build_utils
After installing:
If you install from a binary distribution you should not try to build from source. Just reinstall the binary packages for scikit-learn and you should be able to import sklearn
from your python shell.
Beware, if you use the Python installer from Canopy you should probably better use canopy to install scikit-learn as well: https://www.enthought.com/products/canopy/package-index/ (although the current version available on canopy is a bit old: 0.11 instead of 0.13.1).
If you want to install scikit-learn for your own install of Pythonn 2.7 from the binary packages repository Christoph Gohlke you should also install all the dependencies from the same repository (the scipy-stack meta package should provide them all at once).
When ever in doubt you can check which python you a running with:
>>> import sys; print(sys.executable)
to see the folder where python is installed. You can also list the folders that python uses to lookup packages in:
>>> print(sys.path)
For scikit-learn or numpy you can do:
>>> import sklearn; print(sklearn.__version__); print(sklearn.__path__)
and:
>>> import numpy; print(numpy.__version__); print(numpy.__path__)
Edit: now if you really want to build scikit-learn from source (for instance to install the development branch from the github repository, then you should:
Edit 2 fix a typo: replaced sys.__path__
by sys.executable
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With