Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check that scikit learn is installed in your system? [duplicate]

Tags:

python-2.7

I have Scikit-Learn installed on my system. How can I check its version and its availability in my system?

like image 740
Tanya Jain Avatar asked Mar 21 '18 16:03

Tanya Jain


People also ask

Is scikit-learn already installed in Anaconda?

Canopy and Anaconda for all supported platformsCanopy and Anaconda both ship a recent version of scikit-learn, in addition to a large set of scientific python library for Windows, Mac OSX and Linux. Anaconda offers scikit-learn as part of its free distribution.

Where does scikit-learn install?

Download the source package from http://pypi.python.org/pypi/scikit-learn/ , unpack the sources and cd into the source directory. or alternatively (also from within the scikit-learn source folder): pip install . Packages installed with the python setup.py install command cannot be uninstalled nor upgraded by pip later.

What is the current version of scikit-learn?

scikit-learn 1.1. 2.


1 Answers

This seems like a duplicate of this question

As mentioned there you can do this from a Python REPL:

import sklearn
print(sklearn.__version__)

If scikit-learn is not found on your system, you will get an ImportError: No module named sklearn. If scikit-learn was installed inside a virtualenv, you will need to make sure it is activated via source bin/activate from the virtualenv root directory.

like image 97
Daniel Avatar answered Oct 23 '22 03:10

Daniel