Python scikit error - no module named sklearn

When I follow the website ( https://www.kaggle.com/wiki/GettingStartedWithPythonForDataScience ) and enter python makeSubmission.py I get the following error message:

 ImportError: No module named sklearn 

I think I already installed the following: Python 3.4 for windows sciPy, NumPy and matplotlib Setuptools scikit learn PyCharm

Then I opened the "Python 3.4 command line" and typed import sys; print(sys.__path__) import sys; print(sys.__path__) , but received a message

 Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module object has no attribute '__path__' 

Anyone can help?

+5
source share
2 answers

It looks like you did not install scikit-learn correctly. pip install -U scikit-learn should do the job. Also, I would suggest downloading the Anaconda python distribution if you plan to use python for kaggle contests. It takes care of all the necessary dependencies and contains all the necessary python packages for the competition. I found this easier than tedious dependency loading. Link here

+12
source

Ubuntu 14.04 is called python-sklearn (formerly python-scikits-learn) and can be installed using the following command: sudo apt-get install python-sklearn

+3
source

Source: https://habr.com/ru/post/1216242/


All Articles