The python Scikit-learn package is part of the QGIS.app for macOS: QGIS.app/Contents/MacOS/lib/python3.9/site-packages/sklearn
By now (QGIS 3.28.2 macOS) it is at version 0.23.1. The recent scikit-learn version is at 1.2, but a simple updated using pip is not possible:
/Applications/QGIS.app/Contents/MacOS/bin/pip3 install -U scikit-learn
Requirement already satisfied: scikit-learn in /Applications/QGIS.app/Contents/Resources/python/site-packages (0.23.1)
Collecting scikit-learn
Using cached scikit_learn-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl (9.1 MB)
Requirement already satisfied: numpy>=1.17.3 in /Applications/QGIS.app/Contents/Resources/python/site-packages (from scikit-learn) (1.23.5)
Requirement already satisfied: joblib>=1.1.1 in /Applications/QGIS.app/Contents/Resources/python/site-packages (from scikit-learn) (1.2.0)
Requirement already satisfied: scipy>=1.3.2 in /Applications/QGIS.app/Contents/Resources/python/site-packages (from scikit-learn) (1.10.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /Applications/QGIS.app/Contents/Resources/python/site-packages (from scikit-learn) (2.1.0)
Installing collected packages: scikit-learn
Attempting uninstall: scikit-learn
Found existing installation: scikit-learn 0.23.1
ERROR: Cannot uninstall 'scikit-learn'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
If would be nice if the macOS QGIS could be delivered with a more up-to-date scikit-learn.
(issue originally posted in https://github.com/qgis/QGIS/issues/51557)
Feature description
The python Scikit-learn package is part of the QGIS.app for macOS:
QGIS.app/Contents/MacOS/lib/python3.9/site-packages/sklearn
By now (QGIS 3.28.2 macOS) it is at version 0.23.1. The recent scikit-learn version is at 1.2, but a simple updated using pip is not possible:
If would be nice if the macOS QGIS could be delivered with a more up-to-date scikit-learn.