Skip to main content

Mojo

Mojo is a systems programming language specifically designed for high-performance AI infrastructure and heterogeneous hardware. Our vision for Mojo is to be the one programming language developers need to target diverse hardware—CPUs, GPUs, and other accelerators—using Python's intuitive syntax combined with modern systems programming capabilities. Of course, Mojo also provides strong interoperability with Python.

NOTE: Not available for Windows.

What's in mojo-compiler

The mojo-compiler package includes the minimal dependencies required to build and run Mojo code, such as the Mojo compiler and standard library. It's smaller than the full mojo package and it's useful for environments where you only need to execute Mojo code. For example, mojo-compiler is good if you want it just to run Mojo in a production environment or when you're programming in Python and calling into a Mojo package (but not writing new Mojo code).

The mojo-compiler doesn't include the Mojo language server (LSP), LLDB debugger tools, Mojo code formatter, or Mojo REPL. For a complete developer installation, we recommend the mojo package instead.

Get started with pip

  1. Install Mojo:

    pip install mojo-compiler
    

    If you want the nightly build, instead use:

    pip install --pre mojo-compiler \
      --extra-index-url https://whl.modular.com/nightly/simple/
    
  2. Write some code:

    # hello.mojo
    def main():
        print("Hello, World!")
    
  3. Run the code:

    mojo hello.mojo
    
    Hello, World!
    

Using pip is great for existing Python-based environments, but if you're getting started for the first time, we recommend instead installing with pixi or uv. For more information, see the Mojo quickstart guide.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mojo_compiler-1.0.0-py3-none-manylinux_2_34_x86_64.whl (79.1 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

mojo_compiler-1.0.0-py3-none-manylinux_2_34_aarch64.whl (76.3 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

mojo_compiler-1.0.0-py3-none-macosx_13_0_arm64.whl (71.0 MB view details)

Uploaded Python 3macOS 13.0+ ARM64

File details

Details for the file mojo_compiler-1.0.0-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mojo_compiler-1.0.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e9e60f9638e69ca0f4be7292468523fc98a143f58dbf9024f60ed68b874a867e
MD5 51e3268756fe0cf7c695bd7ea9939fa3
BLAKE2b-256 f05ff38fefe327d1c81e28def69c4a52ae4f75e389cb6e613a2c04ca8d68d582

See more details on using hashes here.

File details

Details for the file mojo_compiler-1.0.0-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for mojo_compiler-1.0.0-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 3ae3eb0c58a8956f542e324f736866df0ae2f9f875e8a279cbeea961ec4e9ee8
MD5 ddf588062710de5fff322bfd4fe2c983
BLAKE2b-256 a5f9cbfe2bf947d0926ad57599513d898f1e02ee0c60af1253b779ecaa810235

See more details on using hashes here.

File details

Details for the file mojo_compiler-1.0.0-py3-none-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mojo_compiler-1.0.0-py3-none-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5077ee27c0dfbbdf138a11ec12838b0d3f10148a874cf95040c9ca2332ae2622
MD5 bda32222f8910602fcaa70057e74447d
BLAKE2b-256 6059c11cf3129d4bc77b1604ac3a84bee51ee1a7cd8a3a8fa25c14528f4bd51e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page