SKLearner Home | About | Contact | Examples

Install Scikit-Learn Dependencies

scikit-learn requires several dependencies, including NumPy, SciPy, joblib, and threadpoolctl.

These can all be easily installed along with scikit-learn using pip, the standard package installer for Python.

pip is included by default with Python 2 starting with version 2.7.9, and with Python 3 starting with version 3.4. This installation procedure will work on Windows, macOS, and Linux.

To install scikit-learn and its dependencies, simply run the following command in your terminal:

pip install -U numpy scipy scikit-learn joblib threadpoolctl

To confirm that the libraries were successfully installed, you can import them in a Python script or interactive shell and print out their version numbers:

import numpy
import scipy
import sklearn
import joblib
import threadpoolctl

print(f"numpy version: {numpy.__version__}")
print(f"scipy version: {scipy.__version__}")
print(f"scikit-learn version: {sklearn.__version__}")
print(f"joblib version: {joblib.__version__}")
print(f"threadpoolctl version: {threadpoolctl.__version__}")

Running the example gives an output like:

numpy version: 1.26.4
scipy version: 1.13.0
scikit-learn version: 1.5.0
joblib version: 1.4.0
threadpoolctl version: 3.4.0


See Also