Mojo Global Access

Hi everyone.

Can I run Mojo on my computer directly, like Node.js or Go, without installing modules into any folder? I want to install Mojo globally on my computer, but I think the Mojo CLI isn’t working, and the documentation shows me installing modules directly into a folder and then running Mojo.

For example;
I can run go init and compile main.go with go build. However, since I can’t do a global installation in Mojo, I have to add modular with Pixi in every folder. Is there no way to globalize this? It would also save memory in multi-project setups.

You can do that with pixi

  • Install nightly mojo
pixi global install mojo -c conda-forge -c https://conda.modular.com/max-nightly
  • Install latest stable mojo (or add version mojo==25.5.0)
pixi global install mojo -c conda-forge -c https://conda.modular.com/max
1 Like

There are a couple of ways to install mojo globally. One is via Pixi global installation:

pixi global install -c https://conda.modular.com/max-nightly/ mojo-compiler

The other uses the new Python wheels:

uv tool install mojo-compiler --force --index-url https://dl.modular.com/public/nightly/python/simple/

I believe in both cases, you’ll end up with a mojo command that you can use system-wide.

However, there still can be advantages in maintaining local project environments to lock specific Mojo versions, dependencies, etc. Also, when it comes to disk space usage, I know Pixi does what it can to cache downloaded packages and hard-link reused binaries.

(Edit: ha, looks like Ehsan and I collided on this.)

2 Likes

Thank you for your feedback. This was helpful.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.