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.


  • Have you tried python -m pip install -U pip before? May 1, 2018 at 15:40

2 Answers 2


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

After downloading the .whl file, this works in the OSgeo shell for me:

python -m pip install scikit_learn-0.19.1-cp27-cp27m-win_amd64.whl

I read from this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.