How to install Mojo on Windows and Write Your First App |Video upload date:  · Duration: PT21M22S  · Language: EN

Step by step guide to install Mojo on Windows configure Modular programming language and create a first app with commands and tips

Quick summary for people who want to skip the rituals

Want Mojo on Windows without a long fight with drivers and environment variables That is doable and a lot less painful than it sounds. This guide walks you through a practical setup using either native Windows or WSL2 with Ubuntu which tends to be the path of least surprise when following Linux focused tooling.

Pick native Windows or WSL2 and why most people pick WSL2

Native Windows can work, but many project tools and examples assume a Linux style shell. WSL2 with Ubuntu gives you that familiar environment plus fewer quirks when installing packages and running build tooling. If you like living dangerously use native Windows. If you like working code pick WSL2.

Quick prep for WSL2

  • Enable WSL2 and install Ubuntu from the Microsoft Store
  • Open your Ubuntu shell and run sudo apt update && sudo apt upgrade -y
  • Make sure virtualization is enabled in BIOS if WSL2 complains

Install the Mojo runtime and developer tools

The project distributes installers and a pip style package when available. Try the python based installer first for speed. If the package name changed check the official Modular docs for the correct install command.

python -m pip install mojo-lang

If you prefer the prebuilt download visit the Modular site and grab the Windows package. Follow the project instructions for any required runtime or driver pieces if you need GPU support later.

Configure PATH and pick an editor

Add the mojo binary folder to your user PATH in Windows environment settings or export the path in your WSL2 profile. This keeps commands like mojo run available without typing the full path every time. Install a friendly editor such as VS Code and enable any Mojo or syntax plugins for a smoother experience.

Create and run a tiny first app

Create a new folder and add a file named hello.mojo with a minimal example. Keep it silly and obvious while you confirm the toolchain works.

print("Hello from Mojo on Windows")

Run it with the runtime command you installed. If you installed the CLI you can usually run

mojo run hello.mojo

If your install provided a REPL try that too. The quick feedback loop is delicious when the first run works.

Troubleshooting for the mildly annoyed

  • Check Python or runtime versions if installation fails
  • Verify PATH entries if mojo is not found
  • Read error output for missing libraries and search the project issue tracker for similar reports
  • If your toolchain requires GPU support skip that until CPU paths are running fine
  • Windows driver and virtualization quirks are common culprits, so double check drivers and WSL2 settings

Extra tips for a less grumpy setup

  • Keep a small test folder with hello.mojo for fast checks
  • Use VS Code tasks or a tiny script to run builds so you do not retype long commands
  • Follow the Modular project documentation for updates to package names or install steps

This short guide covered environment choice, installation methods, PATH setup, and a quick demo to run a first Mojo program on Windows. If something goes wrong try the simple checks above and then consult the project issue tracker. If you enjoy dark debugging humor bring snacks and a beverage of choice.

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.