Tejas Hegde
Tejas Hegde

Reputation: 3

Why can i not import sklearn

Why am I not able to import sklearn? I downloaded Anaconda Navigator and it has scikit-learn in it. I even pip installed sklearn , numpy and scipy in Command Prompt and it shows that it has already been installed, but still when I import sklearn in Python (I use PyCharm for coding) it doesn't work. It says 'No module named sklearn'.

Upvotes: 0

Views: 10198

Answers (3)

Divyanshu Jimmy
Divyanshu Jimmy

Reputation: 2752

If someone is working with via bash here are the steps :

For ubunutu :

sudo apt-get install python-sklearn

Upvotes: 0

Tejas Hegde
Tejas Hegde

Reputation: 3

Problem solved! I didn't know that I was supposed to change my interpreter to Anaconda's interpreter(I am fairly new to Python). Thanks for the help!

Upvotes: 0

DevShark
DevShark

Reputation: 9122

Your python interpretor in pycharm is probably not pointing to Anaconda's python, but to the system's default.

See this to select the correct python binary.

Upvotes: 3

Related Questions