19 buildPythonPackage rec {
20 pname = "scikit-learn";
22 disabled = pythonOlder "3.6";
25 inherit pname version;
26 sha256 = "oDNKGALmTWVgIsO/q1anP71r9LEpg0PzaIryFRgQu98=";
30 # This patch fixes compatibility with numpy 1.20. It was merged before 0.24.1 was released,
31 # but for some reason was not included in the 0.24.1 release tarball.
33 url = "https://github.com/scikit-learn/scikit-learn/commit/e7ef22c3ba2334cb3b476e95d7c083cf6b48ce56.patch";
34 sha256 = "174554k1pbf92bj7wgq0xjj16bkib32ailyhwavdxaknh4bd9nmv";
42 ] ++ lib.optionals stdenv.cc.isClang [
50 propagatedBuildInputs = [
57 checkInputs = [ pytest ];
61 doCheck = !stdenv.isAarch64;
62 # Skip test_feature_importance_regression - does web fetch
65 HOME=$TMPDIR OMP_NUM_THREADS=1 pytest -k "not test_feature_importance_regression" --pyargs sklearn
69 description = "A set of python modules for machine learning and data mining";
71 major = versions.major version;
72 minor = versions.minor version;
73 dashVer = replaceChars ["."] ["-"] version;
75 "https://scikit-learn.org/stable/whats_new/v${major}.${minor}.html#version-${dashVer}";
76 homepage = "https://scikit-learn.org";
77 license = licenses.bsd3;
78 maintainers = with maintainers; [ ];