Import sklearn not working in PyCharm

I installed numpy, scipy and scikit-learn using pip on mac os. However, in PyCharm, all import operations except when I try to import sklearn. I tried to do this in the Python shell, and everything worked out fine. Any ideas as to what causes this? Also, not sure if this is relevant, but I installed scikit-learn last.

The error I get is an unresolved link

+7
python scikit-learn pycharm
source share
2 answers

I managed to figure this out, I had to go to the project interpreter and change the python distribution, since it installed Python by default, and not my own installed distribution.

+5
source share

This worked for me:

In my PyCharm Community Edition 5.0.4 Preference -> Project Interpreter -> check if the sklearn package is installed for the current project interpreter, if not, install it.

+1
source share

All Articles