Version: 1.1.0

Pixi basics

Pixi is a Conda-compatible environment tool. Mojo's install docs use it because a project file can pin both Mojo and its channel.

Essentials

  • Install Pixi with the official script.
  • pixi init writes a pixi.toml.
  • Add the Modular channel before you add Mojo.
  • pixi add mojo records the dependency.
  • pixi run mojo executes inside the environment.

Example

$ pixi init hello-world -c https://conda.modular.com/max/ -c conda-forge
$ cd hello-world
$ pixi add mojo

Keep in mind

Commit pixi.toml and the lock file so teammates get the same compiler.