Installation of MpyLab for Developers

The following walk-through shows the installation process for MpyLab (and scuq) for developers in a virtual environment beginning with freshly cloned repositories.

Make a directory and change to that directory:

foo@bar:path> mkdir test-mpylab
foo@bar:path> cd test-mpylab

Now clone the two main packages scuq and mpylab:

foo@bar:path/test-mpylab> git clone https://gitlab.hrz.tu-chemnitz.de/chair-of-electromagnetic-theory-and-compatibility-at-tu-dresden/mpylab/scuq.git
Cloning into 'scuq'...
remote: Enumerating objects: 294, done.
remote: Counting objects: 100% (294/294), done.
remote: Compressing objects: 100% (111/111), done.
remote: Total 294 (delta 174), reused 291 (delta 171), pack-reused 0 (from 0)
Receiving objects: 100% (294/294), 787.84 KiB | 12.50 MiB/s, done.
Resolving deltas: 100% (174/174), done.
foo@bar:path/test-mpylab> git clone https://gitlab.hrz.tu-chemnitz.de/chair-of-electromagnetic-theory-and-compatibility-at-tu-dresden/mpylab/mpylab.git MpyLab
Cloning into 'MpyLab'...
remote: Enumerating objects: 3515, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 3515 (delta 10), reused 16 (delta 3), pack-reused 3475 (from 2)
Receiving objects: 100% (3515/3515), 29.05 MiB | 39.20 MiB/s, done.
Resolving deltas: 100% (2266/2266), done.

Next we create a virtual environment and activate the environment:

foo@bar:path/test-mpylab> mkdir venv-mpylab && cd venv-mpylab
foo@bar:path/test-mpylab/venv-mpylab> python -m venv .venv
foo@bar:path/test-mpylab/venv-mpylab> source .venv/bin/activate
(venv-mpylab) foo@bar:path/test-mpylab/venv-mpylab>

The active venv is marked with the prefix (venv-mpylab) in front of your prompt.

Now, we are going to install scuq from the source tree. The option ‘-e’ installs it in editable mode:

(venv-mpylab) foo@bar:path/test-mpylab/venv-mpylab> python -m pip install --upgrade pip
(venv-mpylab) foo@bar:path/test-mpylab/venv-mpylab> python -m pip install -e ../scuq

Finally, install mpylab from its source tree as an editable module:

(venv-mpylab) foo@bar:path/test-mpylab/venv-mpylab> python -m pip install -e ../Mpylab
(venv-mpylab) foo@bar:path/test-mpylab/venv-mpylab>

You are now ready to use the MpyLab framework. Enjoy!