2

I installed Anaconda on 64bit windows and I also installed scikit-learn using "conda install scikit-learn". However I can't find scikit-learn when I print out all modules installed in python, and I can't import scikit-learn. So I guess the package wasn't installed correctly.

But if I do "conda update scikit-learn", it will print "all reuqested packages already installed. Packages in environment at ...\AppData\Local\Continuum\Anaconda:" Scikit-learn 0.15.2 np19py27_0

Any suggestions on what might have gone wrong?

Thanks!

user2502206
  • 49
  • 1
  • 1
  • 6

2 Answers2

8

As mentioned in the comments, you import the scikit-learn module using:

import sklearn
Kevin Markham
  • 5,778
  • 1
  • 28
  • 36
0

If it still does not work then try to activate environment which is by default root, if you have not created separate environment while installing.

Just run from cmd : activate {env_name}

For your case, it would be : activate root then run simple python file to check scikit-learn is imported or not.

demo.py

import sklearn

See output in image below :

enter image description here