Reputation: 11
on Ubuntu 16.04 with Anaconda python 2.7, attempting http://scikit-learn.org/stable/auto_examples/cluster/plot_dbscan.html. Getting import error: ImportError: No module named sklearn.cluster. This is from the example code line: from sklearn.cluster import DBSCAN.
I have scikit-learn installed via conda and all appears to be correct.
Any assistance would be greatly appreciated.
thanks
Upvotes: 1
Views: 24965
Reputation: 63
Try running the program explicitly like this:
$python3 your_program.py
Upvotes: 0
Reputation: 162
Did you install scikit-learn?
Make shure you already have a working installation of numpy and scipy
With pip (don't use it if you installed it with anaconda):
pip install -U scikit-learn
Or with condo:
conda install scikit-learn
Or try to upgrade scikit-learn (if you installed it with anaconda or conda)
conda update scikit-learn
You can find a detailed description here: http://scikit-learn.org/stable/install.html
Upvotes: 6