4

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

  • Have you tried python -m pip install -U pip before? – Oscar Campo May 1 '18 at 15:40
1

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
0

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.

-2

Not sure, but is it "scikit_learn" instead of "scikit-learn"? (Underscore rather than a dash(hyphen))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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