Skip to content

How to install OpenMATB?

Julien Cegarra edited this page Apr 11, 2023 · 2 revisions

Requirements

OpenMATB requires Python 3.9 and only depends on the following third-party libraries:

The program is compatible with Windows, Mac and Linux systems. To run perfectly, the software requires only a personal computer and a joystick for the tracking task.

Cross-platform installation

The first thing to do is to install python 3.9 on your computer.

To execute OpenMATB on most platforms, simply clone the current repository to a given local folder. Then, make sure you installed the correct python libraries with pip. The correct library versions are written in requirements.txt. You can use the -r flag of pip to install everything at once.

(In the commands below, replace python with py, under Windows)

python -m pip install -r requirements.txt

You can now launch OpenMATB by executing the main.py file with python 3.9.

python main.py

Virtual environment

If you want to create a dedicated python installation (so various python projects won’t overlap), you might want to install a virtual environment in your local repository. To do so, follow the instructions detailed on this related page.

Warning: be sure to create the virtual environment into a directory named .venv. If you want to use an other name, make sure to change the main.py shebang (#! .venv/bin/python3.9) that allows its direct execution with the distribution installed in the virtual environment.

Once the virtual environment is set, you must activate it to install the required dependencies into it:

  • Under Linux: source .venv/bin/activate
  • Under Windows: .venv\Scripts\activate.bat (see this page for more information).

Now that your virtual environment is activated, just install the dependencies as you would do for a "global" python distribtion.

python -m pip install -r requirements.txt

Finally, you can simply execute the main.py. Two possibilities here :

  1. You can activate the OpenMATB virtual environment and type python main.py in the shell;
  2. Or you can execute main.py and let the shebang finds the virtual distribution for you. In that case, (a) no need to activate the virtual environment, (b) be sure that you made the main.py file executable.

Use of compiled source (coming soon)

If you don't mind not seeing all the source files, you might want to use compiled versions of the software. The good thing here is that you don't have to install neither python nor its dependencies to make OpenMATB working.