1. Download the code

Go to GitLab - OpenTPS

git clone https://gitlab.com/openmcsquare/opentps.git

Don’t hesitate to register as OpenTPS user and tell us more about your project by clicking here

2. Install OpenTPS libraries on your computer

To set up OpenTPS on your computer, the recommended workflow is to use uv with a local virtual environment.

The setup flow is the same on Windows and Linux once uv is installed.

First, install uv from https://docs.astral.sh/uv/.

After cloning the git repository, open a command prompt in the main directory and run:

uv sync

This creates the local virtual environment and installs all dependencies.

If you want to launch the GUI, go to the section 2.3. below.

2.2. Optional: use Anaconda or the legacy scripts

2.2.1. On Windows with Anaconda

If you don’t have Anaconda, download the latest version from https://www.anaconda.com/.

After cloning the git repository, you will find the .bat file install_opentps_anaconda_windows.bat in the main directory.

To begin, open a command prompt and navigate to the main directory. Run:

.\install_opentps_anaconda_windows.bat

This creates a new Python environment named “OpenTPS” and downloads all the necessary packages.

2.2.2. On Windows with the venv scripts

After cloning the repository, you will find the .bat file install_opentps_venv_windows.bat in the main directory.

To begin, open a command prompt and navigate to the main directory. Run:

.\install_opentps_venv_windows.bat
2.2.3. On Linux

After cloning the repository, you will find the .sh file install_opentps_linux.sh in the main directory.

To begin, open a command prompt and navigate to the main directory. Run:

bash install_opentps_linux.sh

2.3. Launch the GUI

If your virtual environment is active, you can launch the GUI by running:

opentps

If you used the scripts, launch the GUI with the matching start command:

.\start_opentps_anaconda_windows.bat
.\start_opentps_venv_windows.bat
bash start_opentps_linux.sh

You can also launch it by executing opentps_core/opentps/gui/main.py or via a script with:

import opentps.gui as opentps_gui
opentps_gui.run()

Note that the GUI will block the main thread.