Requirements

The devices as well as the server used to serve the backend use Python 3.

Also, they have some dependencies that need to be installed for them to work properly.

Note

For the backend this only applies if you install it from source. If you use the MUSCLE docker image everything is setup to work out of the box.

We recommend to use a virtual environment, where the required Python packages can coexist with pre-installed packages from the host system. To facilitate the setup of Python virtual environment we provide a so called “requirements” manifest file. Follow the description below to create, activate and prepare the virtual environment.

  • Create a virtual environment

    python3 -m venv venv
    
  • Activate the environment

    source venv/bin/activate
    
  • Install Python packages from manifest file

    pip install -r requirements.txt
    

The virtual environment does not need to be enabled for production use. To disable the virtual environment after installation, run the following command in the “venv” shell.

deactivate

Note

While implementing devices it is very likely that you will need additional libraries. Once you have finished make sure to add those to the requirements too: pip freeze > requirements.txt.