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?
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.
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 .
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With