Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python scikit error - no module named sklearn

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

ImportError: No module named sklearn

I think I have already successfully installed the following: Python 3.4 for windows sciPy,NumPy and matplotlib setuptools scikit-learn PyCharm

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

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

Anyone can help?

like image 440
user4352158 Avatar asked Mar 27 '15 02:03

user4352158


People also ask

Why is sklearn not working in Jupyter?

Every time you install a package, this installation is associated with just a single version. Therefore, there's a chance that you have installed scikit-learn for one Python version, but you are executing your source code using a different version and this may be the reason why scikit-learn cannot be found.

How do I add sklearn to Pycharm?

Select your current project. Click the Python Interpreter tab within your project tab. Click the small + symbol to add a new library to the project. Now type in the library to be installed, in your example "sklearn" without quotes, and click Install Package .


1 Answers

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

like image 133
PhuTV Avatar answered Oct 10 '22 23:10

PhuTV