BabbaBooey
BabbaBooey

Reputation: 381

Cannot import scikit-learn

Beginner here, please be gentle! I’m receiving an error that reads

ImportError: No module named sklearn when using pycharm.

I’m trying to import matplotlib, numpy, and sklearn. I’ve downloaded scikit_learn. I’ve also downloaded anaconda.

I have “two” pythons. Looks like this…

  1. MacHD/Library/Frameworks/python.framework/versions/3.4/site-packages/sklearn

  2. MacHD/Library/Python/2.7/ ... in here is pip and scikit_learn

The strange thing is that matplotlib and numpy work but not sklearn. How can I figure out what's wrong?

Upvotes: 0

Views: 820

Answers (1)

asmeurer
asmeurer

Reputation: 91450

The MacHD/Library/Frameworks/python.framework/versions/3.4/site-packages/sklearn is for Python 3.4 (note the 3.4 in the path) and the MacHD/Library/Python/2.7/ is for Python 2.7. The packages for each are independent of each other.

Upvotes: 1

Related Questions