Skip to main content

Install MAX

Welcome to the MAX install guide!

The MAX SDK includes everything you need to develop and deploy low-latency AI inference pipelines into production and build other programs with Mojo. Read about what's included.

Updating?

If you already installed MAX, instead see the update guide.

Requirements

  • Apple silicon (M1/M2/M3 processor)
  • macOS Ventura (13) or later
  • Python 3.9 - 3.11
  • Xcode or Xcode Command Line Tools
  • Homebrew

Install MAX

note

By downloading the MAX SDK, you understand and agree to the MAX software license.

The MAX SDK is available as either a stable build or a nightly build. We strive to release stable builds once a month and release nightly builds as often as possible (not necessarily every day).

  1. Open a terminal and install the modular command line tool with this helper script:

    curl -s https://get.modular.com | sh -
    Or, click here to see the manual install commands.
    brew update && brew install modularml/packages/modular
  2. Create a virtual environment:

    For most users, we recommend venv (it's included with Python). Also make sure you're using a compatible version of Python. For example:

    python3.11 -m venv max-venv && source max-venv/bin/activate
  3. Create or sign into your Modular account:

    modular auth
  4. Install the MAX SDK (it includes Mojo):

    modular install max
  5. Install the MAX Engine Python package:

    MAX_PATH=$(modular config max.path) \
    && python3 -m pip install --find-links $MAX_PATH/wheels max-engine

    If you encounter an error here, make sure you have a compatible Python version (see the requirements).

  6. Set environment variables so you can access the mojo and max tools:

    If you're using Bash, run this command:

    MAX_PATH=$(modular config max.path) \
    && BASHRC=$( [ -f "$HOME/.bash_profile" ] && echo "$HOME/.bash_profile" || echo "$HOME/.bashrc" ) \
    && echo 'export MODULAR_HOME="'$HOME'/.modular"' >> "$BASHRC" \
    && echo 'export PATH="'$MAX_PATH'/bin:$PATH"' >> "$BASHRC" \
    && source "$BASHRC"

    Only if you're using conda, you need to re-activate your environment because it gets deactivated when you source the shell configuration files (the previous command):

    conda activate max

Now you're ready to go.

You can verify your version by calling max or mojo with the --version option (both tools have the same version):

max --version

Get started

note

To help us improve MAX, we collect some telemetry data and crash reports. Learn more.