Install MAX
You can install MAX as a conda package named max
. As shown below, we
recommend installing MAX with magic
, a package manager and virtual
environment manager that supports both conda and PyPI packages.
This page shows how to install MAX, but if you just want to start building stuff, instead check out our tutorials, which all include installation.
Stable release
Magic makes it easy to install a different version of MAX for each project.
When you create a project with magic
, it adds the following conda channel to
your project configuration by default:
https://conda.modular.com/max/
https://conda.modular.com/max/
Then you can install the latest stable build or pin your project to a specific version. For example:
-
Create a
my-project
directory withmagic init
:magic init my-project --format pyproject
magic init my-project --format pyproject
-
Install MAX with
magic add
:cd my-project
cd my-project
magic add max
magic add max
This ensures that you always have the latest version of MAX.
You can also specify the version using Python version operators. For example, here's how to pin your version to version 24.5:
magic add "max==24.5"
magic add "max==24.5"
That's it. You just installed MAX for your project's virtual environment.
You can check the installed max
version like this:
magic run python3 -c 'from max import engine; print(engine.__version__)'
magic run python3 -c 'from max import engine; print(engine.__version__)'
24.5.0
24.5.0
To learn more about how to manage your packages and interact with the Magic virtual environment, see the Magic documentation.
Nightly release
Nightly builds give you access to the bleeding-edge version of MAX. These builds include new features, but they're not fully tested, so they might include new bugs.
Fortunately, you can safely try a nightly build in one project without
affecting your other projects, because every project you create with magic
has its own package dependencies.
To install a nightly build, you just need to modify your project configuration to use the nightly channel:
https://conda.modular.com/max-nightly/
https://conda.modular.com/max-nightly/
For example, here's how to create a project with a nightly build:
-
Create a new project and specify the
max-nightly
channel with themagic init -c
option:magic init nightly-project --format pyproject \
-c conda-forge -c https://conda.modular.com/max-nightlymagic init nightly-project --format pyproject \
-c conda-forge -c https://conda.modular.com/max-nightlyWhen you include the
-c
(--channel
) option, you must specify all channels for your project. Be sure to includeconda-forge
(or another conda channel) to install packages other than MAX.Or, manually edit the default
max
channel to usemax-nightly
. Either way, thepyproject.toml
file in your project should include this:pyproject.toml[tool.pixi.project]
channels = ["conda-forge", "https://conda.modular.com/max-nightly/"][tool.pixi.project]
channels = ["conda-forge", "https://conda.modular.com/max-nightly/"] -
Install MAX with
magic add
:cd nightly-project
cd nightly-project
magic add max
magic add max
You should see the nightly version name with the build date. For example:
✔ Added max >=24.6.0.dev2024111705,<25
✔ Added max >=24.6.0.dev2024111705,<25
Next steps
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!