SKLearner Home | About | Contact | Examples

Upgrade Scikit-Learn on macOS with MacPorts

MacPorts is a package management system for macOS that simplifies the installation of software.

It can be used to easily install scikit-learn on macOS systems where MacPorts is installed.

To install scikit-learn using MacPorts, run the following command in your terminal:

sudo port install py39-scikit-learn

After installation, you can import scikit-learn in a Python script or interactive shell and print out the version number to confirm the installation:

import sklearn
print(sklearn.__version__)

Running the example gives an output like:

1.5.0


See Also