Skip to content

Python Setup

MLOps Desktop uses your system Python to run ML pipelines. This guide covers installation and configuration.

Open Terminal and run:

Terminal window
python3 --version

You should see Python 3.9 or later. If not installed, follow the installation steps below.

Homebrew is the easiest way to manage Python on macOS:

Terminal window
# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install python@3.11
# Verify
python3 --version

MLOps Desktop requires these Python packages:

PackagePurpose
scikit-learnML algorithms (Random Forest, Gradient Boosting, etc.)
pandasData loading and manipulation
numpyNumerical operations
optunaHyperparameter tuning
shapModel explainability
matplotlibVisualization (for SHAP plots)

Run this command to install everything:

Terminal window
pip3 install scikit-learn pandas numpy optuna shap matplotlib

Test that packages are installed correctly:

Terminal window
python3 -c "import sklearn, pandas, numpy, optuna, shap; print('All packages installed!')"
  1. Open MLOps Desktop

  2. Check auto-detected path

    The app shows the detected Python path in the toolbar. Click it to see the full path.

  3. Change Python path (if needed)

    If the wrong Python is detected:

    • Click the Python path in the toolbar
    • Enter the correct path (e.g., /opt/homebrew/bin/python3)
    • Press Enter to save
  4. Verify packages

    Run a simple pipeline to confirm packages are available.

Not sure which Python to use? Run these commands:

Terminal window
# Show all Python installations
which -a python3
# For Homebrew Python
/opt/homebrew/bin/python3 --version
# For system Python (not recommended)
/usr/bin/python3 --version

Common paths:

InstallationPath
Homebrew (Apple Silicon)/opt/homebrew/bin/python3
Homebrew (Intel)/usr/local/bin/python3
Official installer/Library/Frameworks/Python.framework/Versions/3.X/bin/python3
pyenv~/.pyenv/shims/python3
Terminal window
# Create a virtual environment
python3 -m venv ~/.mlops-env
# Activate it
source ~/.mlops-env/bin/activate
# Install packages
pip install scikit-learn pandas numpy optuna shap matplotlib
# Get the Python path for MLOps Desktop
which python
# → /Users/yourname/.mlops-env/bin/python

Use this path in MLOps Desktop to ensure consistent package versions.

Terminal window
# Create environment
conda create -n mlops python=3.11
# Activate
conda activate mlops
# Install packages
conda install scikit-learn pandas numpy optuna shap matplotlib
# Get path
which python
# → /opt/homebrew/anaconda3/envs/mlops/bin/python

The package is named scikit-learn but imported as sklearn:

Terminal window
pip3 install scikit-learn

Use pip3 instead of pip:

Terminal window
pip3 install package-name

You may have multiple Python installations. Check which pip you’re using:

Terminal window
which pip3
# Make sure it matches the Python path in MLOps Desktop

SHAP requires a C compiler. Install Xcode command line tools:

Terminal window
xcode-select --install

Then retry: pip3 install shap

On modern macOS, use --user or --break-system-packages:

Terminal window
pip3 install --user scikit-learn
# OR
pip3 install --break-system-packages scikit-learn

Next: Quickstart — Build your first pipeline