0

On my OSX laptop I have installed Sci Kit Learn by copying and pasting this command pip install -U numpy scipy scikit-learn to terminal as instructed on this page.

This is the result I get when I run the command on terminal again:

Requirement already up-to-date: numpy in /usr/local/lib/python2.7/site- packages
Requirement already up-to-date: scipy in /usr/local/lib/python2.7/site-packages
Requirement already up-to-date: scikit-learn in /usr/local/lib/python2.7/site-packages
Cleaning up...

This is the error message I get when I run from sklearn import datasets on Python 3.3.4. IDLE: (I was trying this example)

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
from sklearn import dataset
ImportError: No module named 'sklearn'

What is the issue here?

user927584
  • 395
  • 2
  • 6
  • 14

1 Answers1

1

You have the packages installed for python 2.7 as you can see in the log

Requirement already up-to-date: numpy in /usr/local/lib/python2.7/site-packages

and you're running with python 3.3.4.
So either run it with python 2.7.x or install the packages for python3.x. How? Check here

Community
  • 1
  • 1
Tim
  • 41,901
  • 18
  • 127
  • 145