Site icon TestingDocs.com

Install Mojo SDK on Ubuntu

Overview

Let’s learn how to install Mojo SDK on an Ubuntu Linux machine. Mojo is a high-performance programming language that combines Python’s usability with the C language’s high-performance capabilities. It is used to develop AI applications and the extensibility of AI models.

The best way to get Mojo is to install MAX SDK on the computer. MAX SDK is the super set that includes Mojo. Steps to install MAX SDK are outlined here.

Install Mojo SDK

Follow the below steps to install Mojo SDK on the machine:

Install the Modular CLI tool.

Sign in to your Modular developer account. Complete the authentication procedure using the following command:

$ modular auth

To complete the authentication, open the web page on the browser:

https://developer.modular.com/device?userCode=<code>

Verify using this code on the webpage:
<code>

Install the Mojo SDK using the following command:

$ modular install mojo

 

Set the environment variables:

MODULAR_HOME and configure the PATH variable.

BASHRC=$( [ -f “$HOME/.bash_profile” ] && echo “$HOME/.bash_profile” || echo “$HOME/.bashrc” )
echo ‘export MODULAR_HOME=”/home/testingdocs/.modular”‘ >> “$BASHRC”
echo ‘export PATH=”/home/testingdocs/.modular/pkg/packages.modular.com_mojo/bin:$PATH”‘ >> “$BASHRC”
source “$BASHRC”

Verify the Install

To verify the install, type the following command to start the Mojo REPL:

$ mojo

That’s it. Mojo is successfully installed on the machine.

More information at Modular official website:

https://www.modular.com/

Exit mobile version