Installation guide

This part of the summer school uses the Python programming language throughout the sessions. In case you are not familiar with Python it will still be possible to run code or get familiar with general concepts. Using python is necessary because modern deep learning libraries like PyTorch are the de facto standard, which becomes relevant for workshop session 2 and 3.

Session 1

Please make sure to have a working installation of miniconda, which includes an up-tp-date version of python. You can the version for your operating system of choice from: https://docs.conda.io/en/latest/miniconda.html

If you have miniconda installed, please setup a conda environment. The following setup instructions are valid for MacOS or Linux, in case of Windows look for the Anaconda Prompt Terminal, use Windows-Subsystem for Linux (WSL), or checkout the https://docs.conda.io/en/latest/index.html webiste for further help.

After installing miniconda you and have opened a Terminal we create the environment as follows:

conda create -n workshop-kenya
conda activate workshop-kenya

Now that the environment is active you can install all the necessary python packages. You don’t need to install everything at once but can do so through-out the workshop. Please make sure to always activate the conda environemnt before installing anything python-related with pip, conda or mamba.

To start with some installions:

pip install jupyterlab numpy pandas matplotlib seaborn msprime scikit-allel tsinfer numba tsdate

If you have finished working you may simply close the terminal or type conda deactivate.

Session 2

Some installations are a bit more complicated like the installtions for the deep learning library and graph neural network extension:

Let’s first install mamba following the websites instructions: https://mamba.readthedocs.io/en/latest/installation.html

conda install mamba -n base -c conda-forge

Installing mamba is not strictly necessary since conda is already installed but it will make the following installations faster. You may use “conda” and “mamba” interchangingly.

Next go to the Pytorch website (https://pytorch.org/) and copy the relevant installation command for you:

For example:
> mamba install pytorch torchvision pytorch-cuda=11.6 -c pytorch -c nvidia

Session 3

Installation of Pytorch Geometric. Please go to the Pytorch Geometric website (https://pytorch-geometric.readthedocs.io/) and follow the installation instructions:

For example:

mamba install pyg -c pyg