Packages
All the Modular APIs and tools (including MAX and Mojo) are included in a
single Python/Conda package named modular
. This page explains what's in the
package and shows how to install it.
If you just want to get started with Modular, instead see our quickstart guide.
Package managers
You can install modular
as a Python or Conda package. The install
instructions below include commands for popular package managers such as
pixi
, uv
, pip
, and conda
, but you can also use something else.
Traditional tools like pip
and conda
might be necessary for existing
production environments or Docker containers, but for your local development,
we recommend using Pixi.
Pixi is both a package manager and virtual environment manager, which alone makes development a lot easier, but it's also language agnostic, extremely fast, and includes lock files to easily reproduce your project environment.
You'll notice that our GitHub code
examples include a
pixi.toml
file. This file configures the environment to make sure we all use
the same packages and get the same results—you just need to install pixi
.
So if you're not set on using a particular package manager, we suggest you try
pixi
. If you haven't used it before, check out our Pixi basics guide
or the official Pixi docs.
What's included
Here's a summary of what's in the modular
package.
- conda/pixi
- pip/uv
The modular
conda package installs the following:
- MAX tools and libraries
- Mojo tools and libraries
mojo
CLI- Mojo standard library
- Mojo LSP
- Mojo debugger
pixi
known issues:
- You might encounter issues if you invoke
pixi
within aconda
virtual environment. It's best if you don't mix the two tools.
The modular
Python wheel installs the following:
- MAX tools and libraries
- Mojo tools and libraries
pip
known issues:
-
The Mojo LSP isn't included. However, if you're using VS Code, the Mojo LSP is provided by the Mojo VS Code extension. We're working to make the Mojo LSP also available separately.
-
The Mojo debugger isn't included. If you want to develop with Mojo, we currently recommend you install the
modular
conda package withpixi
orconda
.
Install
To get the latest improvements and new features, we recommend installing our nightly build, which we release several times a week. If you want a better tested but older version, you can install a stable build. (Each release is described in the changelog.)
- pixi
- uv
- pip
- conda
- If you don't have it, install
pixi
:curl -fsSL https://pixi.sh/install.sh | sh
curl -fsSL https://pixi.sh/install.sh | sh
Then restart your terminal for the changes to take effect.
- Create a project:
pixi init example-project \
-c https://conda.modular.com/max-nightly/ -c conda-forge \
&& cd example-projectpixi init example-project \
-c https://conda.modular.com/max-nightly/ -c conda-forge \
&& cd example-project - Install the
modular
conda package:- Nightly
- Stable
pixi add modular
pixi add modular
pixi add "modular=25.4"
pixi add "modular=25.4"
- Start the virtual environment:
pixi shell
pixi shell
- If you don't have it, install
uv
:curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/uv/install.sh | sh
Then restart your terminal to make
uv
accessible. - Create a project:
uv init example-project && cd example-project
uv init example-project && cd example-project
- Create and start a virtual environment:
uv venv && source .venv/bin/activate
uv venv && source .venv/bin/activate
- Install the
modular
Python package:- Nightly
- Stable
uv pip install modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--index-url https://dl.modular.com/public/nightly/python/simple/ \
--index-strategy unsafe-best-match --prerelease allowuv pip install modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--index-url https://dl.modular.com/public/nightly/python/simple/ \
--index-strategy unsafe-best-match --prerelease allowuv pip install modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--extra-index-url https://modular.gateway.scarf.sh/simple/ \
--index-strategy unsafe-best-matchuv pip install modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--extra-index-url https://modular.gateway.scarf.sh/simple/ \
--index-strategy unsafe-best-match
- Create a project folder:
mkdir example-project && cd example-project
mkdir example-project && cd example-project
- Create and activate a virtual environment:
python3 -m venv .venv/example-project \
&& source .venv/example-project/bin/activatepython3 -m venv .venv/example-project \
&& source .venv/example-project/bin/activate - Install the
modular
Python package:- Nightly
- Stable
pip install --pre modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--index-url https://dl.modular.com/public/nightly/python/simple/pip install --pre modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--index-url https://dl.modular.com/public/nightly/python/simple/pip install modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--extra-index-url https://modular.gateway.scarf.sh/simple/pip install modular \
--extra-index-url https://download.pytorch.org/whl/cpu \
--extra-index-url https://modular.gateway.scarf.sh/simple/
- If you don't have it, install conda. A common choice is with
brew
:brew install miniconda
brew install miniconda
- Initialize
conda
for shell interaction:conda init
conda init
If you're on a Mac, instead use:
conda init zsh
conda init zsh
Then restart your terminal for the changes to take effect.
- Create a project:
conda create -n example-project
conda create -n example-project
- Start the virtual environment:
conda activate example-project
conda activate example-project
- Install the
modular
conda package:- Nightly
- Stable
conda install -c conda-forge -c https://conda.modular.com/max-nightly/ modular
conda install -c conda-forge -c https://conda.modular.com/max-nightly/ modular
conda install -c conda-forge -c https://conda.modular.com/max/ modular
conda install -c conda-forge -c https://conda.modular.com/max/ modular
The modular
package installs MAX, Mojo, and other package dependencies.
Uninstall
- pixi
- uv
- pip
- conda
You can uninstall modular
from your virtual environment with this
command:
pixi remove modular
pixi remove modular
To deactivate your virtual environment, run:
exit
exit
You can uninstall modular
from your virtual environment with the following
command:
uv pip uninstall modular
uv pip uninstall modular
To deactivate your virtual environment, run:
deactivate
deactivate
You can uninstall modular
from your virtual environment with the following
command:
pip uninstall modular
pip uninstall modular
To deactivate your virtual environment, run:
deactivate
deactivate
You can uninstall modular
from your virtual environment with this
command:
conda remove modular
conda remove modular
To deactivate your virtual environment, run:
deactivate
deactivate
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!