[GIS] Installing scikit-learn python package for QGIS on Win

osgeo4wpythonqgisscikit learnwindows

I want to install scikit-learn package to be executed in Python-QGIS. I've tried to use OSGeo4W Shell to install with pip. But I got this error.
I've tried to run osgeo4w-setup-x86_64.exe and install all Python packages but it doesn't work.

Error

Best Answer

It's an SSL certificate error, I think resulting from the python.org host not taking HTTP url requests (or possibly your firewall blocking it). You can try the following line, which may or may not immediately solve the problem:

pip install --trusted-host pypi.python.org scikit-learn

Or, the approach I've taken with the OSGeo4W Python installs that are sectioned off, is to download the module as a Wheel Package sourced from https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn. Ensure you grab the correct wheel based on your system (32 or 64 bit) and Python version (2.7, 3.6 etc). With my OSGeo4W default Python, it would be:

pip install scikit_learn‑0.19.1‑cp27‑cp27m‑win_amd64.whl