sklearn vs scikit-learn

Issue #133 resolved
Fabian Thiel created an issue

As I tried to install the EnMAP-Box on another system (Server), I encountered a problem: On startup the Box warned me that it could not find sklearn (although I installed it with administrator rights using python3 -m pip install sklearn).

Due to that error I came across two things:

  1. It seems that it is recommended to write/use scikit-learn in pip https://pypi.org/project/sklearn/ instead of sklearn. Also, sklearn cannot deal with version handling in pip, as it is always version 0.0 (i.e. pip install sklearn==0.19.1 will not work)? So we might want to change that in the documentation (and maybe in the source code where we check for dependencies)!?

  2. I then tried to install an older version of scikit-learn using python3 -m pip install scikit-learn==0.19.1 --user which then did the trick, i.e. the Box would start. So might there be a problem with the newest version 0.19.2!? Nonetheless, there might have been still some issues with admin rights on the server environment (as I used --user while installing the lower version), therefore I will try to reproduce this behavior on another machine.

tbc

Comments (4)

  1. Benjamin Jakimow

    I think installing older versions of any python package is not an option. Instead, the QGIS3 python environment should allow to install newer packages using pip. At least I was able to do so for scipy, numpy and even pip without problems for QGIS 3.2, although the QGSeo4W installer points to older versions.

    Yes, the documentation should be changed to "pip install scikit-learn" as this is the official recommendation in https://pypi.org/project/scikit-learn/

  2. Log in to comment