Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting PyCharm to import sklearn

Tags:

Beginner here.

I’m trying to use sklearn in pycharm. When importing sklearn I get an error that reads “Import error: No module named sklearn” The project interpreter in pycharm is set to 2.7.10 (/anaconda/bin/python.app), which should be the right one. Under default preferenes, project interpreter, I see all of anacondas packages. I've double clicked and installed the packages scikit learn and sklearn. I still receive the “Import error: No module named sklearn”

Does anyone know how to solve this problem?

like image 913
BabbaBooey Avatar asked Sep 20 '15 02:09

BabbaBooey


People also ask

Does PyCharm support scikit-learn?

If you are using python 3. xx version then use the pip3 command to install scikit-learn. It will successfully install the scikit- learn package in Pycharm.

How do I import a module into PyCharm?

PyCharm can do both. Type the name of the package and hit Alt-Enter , then choose Install and Import package . PyCharm will do both: you'll see a notification during the installation, then the import will be generated in the right way, according to your project styles.

What is import Sklearn in Python?

Scikit-learn is a machine learning library for Python. It features several regression, classification and clustering algorithms including SVMs, gradient boosting, k-means, random forests and DBSCAN. It is designed to work with Python Numpy and SciPy.


1 Answers

To make sure you have Scikit-learn package installed on your PyCharm IDE, go to File Menu>Settings and search for Interpreter. Select Project Interpreter, and if you dont see Scikit-learn in the list of packages, click the + sign on the right end. It brings us another window with a search bar, where you can type 'Scikit-learn' and install (see screenshots). I hope this helps.

Screenshots: Interpreter Settings, Install Package

like image 61
SPanchakarla Avatar answered Oct 02 '22 02:10

SPanchakarla