Raspberry Pi

How to Install Wolfram Language and Mathematica on Raspberry Pi

Raspberry Pi is a mini, single-board computer which was designed to help students and teachers in academia. There are many programming languages and software tools that can be run on Raspberry Pi to help students and teachers in different subjects. One such tool is Mathematica, which is used to solve and display mathematical equations. Mathematica is based on Wolfram so to run it on Raspberry Pi, the Wolfram language should also be installed on it.

In the writeup, the installation and use of Wolfram and Mathematica on Raspberry Pi is discussed.

How to Install Wolfram Language and Mathematica on Raspberry Pi

To install the Wolfram language and Mathematica on Raspberry Pi, follow the below-written steps:

Step 1: First update the Raspberry Pi repository before installing Wolfram language and Mathematica because we are going to install it from the repository.

$ sudo apt update
$ sudo apt upgrade

Step 2: Now install Wolfram Engine by using the below-mentioned command as this will install both Wolfram language and Mathematica on Raspberry Pi.

$ sudo apt install wolfram-engine

Note: The installation process will take some time, so be patient.

Step 3: Once the installation is completed, you can access Wolfram and Mathematica either from the GUI or from the terminal.

GUI Method

For the GUI method, you can access Mathematica and Wolfram from the Programming option in the Application Menu.

Terminal Method

From the terminal, you can access the Wolfram and Mathematica by simply calling them by the commands shown below:

For Mathematica

$ mathematical

For Wolfram Language

$ wolfram

Use Wolfram and Mathematica on Raspberry Pi

Using Wolfram and Mathematica on Raspberry Pi is simple and quick. Let’s run one example for both Wolfram and Mathematica:

For Wolfram

You can perform a numerical calculation on the terminal directly using the Wolfram Language, first use the “wolfram” command to open the Mathematica Environment on the terminal. Then you can perform numerical calculations, such as adding, multiplying, or dividing numbers and so on.

For instance, here I have added two numbers 7 and 9 in Wolfram language:

7+9

Mathematica

You can also perform the same calculation on the Mathematica GUI application, which can be opened from the Programming section as shown above.

After a few seconds you will see the below-shown layout, click on the New Notebook here:

Then select the free-form input, if you want to run the equations with equality:

After that write your input, and to get the output, click on the equal to sign and the output of the equation will display on the screen:

Conclusion

Wolfram and Mathematica can be installed through apt package manager. Simply update/upgrade the repository first and then use apt command to install wolfram-engine. The wolfram engine installs both Mathematica and Wolfram language on the Raspberry Pi system. You can then use the GUI or terminal methods to open any of them and perform numerical calculations on Raspberry Pi.

About the author

Zahra Zamir

An Electronics graduate who loves to learn and share the knowledge, my passion for my field has helped me grasp complex electronics concepts and now I am here to share them with others.