Step 1 : Prerequisites
- Python (>= 2.6 or >= 3.3),
- NumPy (>= 1.6.1),
- SciPy (>= 0.9)
If you install Anaconda version then you don’t need to install numpy and scipy separately.
If you have pip install then Install scikit learn by using pip.You will also need to install numpy and scipy separately.
How to Install numpy & Scipy separately on Windows?
If you installed Pip then you need to do following steps.
- First check your Python version .
- All installs available on one link : http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
- Install numpy+mkl before installing scipy !
- In SciPy section choose correct version of scipy as per your Python version.
- In my case my Python version is 3.5.3 so I Downloaded scipy‑0.19.1‑cp35‑cp35m‑win_amd64.whl file
- Go to downloaded file location and open command prompt there. Type command ‘Pip install [Downloaded file name with extension]‘
Step 1 : Main Installation
To Install scikit learn by using pip. In command Prompt type :
- pip install scikit–learn
To Install scikit learn by using conda, In command Prompt type :
- conda install scikit–learn
Important instruction from scikit-learn :
Note: To upgrade or uninstall scikit-learn installed with Anaconda or
conda you should not use the pip command. Instead:
- conda update scikit–learn
pip install -U scikit-learn
conda remove scikit-learn
pip uninstall scikit-learn
Step 3 : Confirm Installation
Open Python IDLE
>> import sklearn
If you see no error after this then you are good to go. ! 🙂