No candidates were found for modular *

I’m trying to test a simple Python script calling a Mojo function. It works with a pip installed Mojo. Trying to get it working with pixi fails. Here is the log:

paul@desktop:~/st-python$ pixi init mojo-0
✔ Created /home/paul/st-python/mojo-0/pixi.toml
paul@desktop:~/st-python$ cd mojo-0/
paul@desktop:~/st-python/mojo-0$ pixi add modular
Error:   × failed to solve 'default' for linux-64
  ├─▶ failed to solve the environment
  ╰─▶ Cannot solve the request because of: No candidates were found for modular *.

Do I have to install Mojo binaries somewhere?

Try to add modular channel https://conda.modular.com/max in pixi.toml.

[project]
authors = ["Cyrill <cyrill.zadra@gmail.com>"]
channels = ["conda-forge", "https://conda.modular.com/max"]
description = "Add a short description here"

After you added channel try again pixi add modular.

1 Like

Thank you. It started installing. Somehow I missed adding channels section on Pixi basics | Modular.

Per our docs, you can add this once and the pixi init adds the conda channel for you.

echo 'default-channels = ["https://conda.modular.com/max-nightly", "conda-forge"]' >> $HOME/.pixi/config.toml

btw I recommend to use the nightly channel https://conda.modular.com/max-nightly as it’s a super set of the stable channel.

3 Likes