Getting started

Installation on Linux

Note

Installation is only tested on (Debian-like) Linux OS.

Ding0 is provided through PyPi package management and, thus, installable from sources of pip3. You may need to additionally install some specific system packages for a successful installation of Ding0 and its dependencies.

The script ding0_system_dependencies.sh installs required system package dependencies.

cd <your-ding0-install-path>

chmod +x ding0_system_dependencies.sh

sudo ./ding0_system_dependencies.sh

We recommend installing Ding0 (and in general third-party) python packages in a virtual environment, encapsulated from the system python distribution. This is optional. If you want to follow our suggestion, install the tool virtualenv by

sudo apt-get install virtualenv # since Ubuntu 16.04

Afterwards virtualenv allows you to create multiple parallel python distributions. Since Ding0 relies on Python 3, we specify this in the virtualenv creation. Create a new one for Ding0 by

# Adjust path to your specific needs
virtualenv -p python3.8 ~/virtualenvs/ding0

Jump into (aka. activate) this python distribution by

# Adjust path to your specific needs
source ~/virtualenvs/ding0/bin/activate

From that, the latest release of ding0 is installed by

pip install ding0

Pip allows to install a developer version of a package that uses currently checked out code. A developer mode installation is achieved by cloning the repository to an arbitrary path (e.g. ~/repos/ in the following example) and installing manually via pip:

mkdir ~/repos/
cd ~/repos/
git clone https://github.com/openego/ding0.git # for SSH use: git clone git@github.com:openego/ding0.git
pip install -e ~/repos/ding0/

Installation on Windows

To install Ding0 in windows, it is currently recommended to use Anaconda or Miniconda and create an environment with the ding0_env.yml file provided.

Note

Normally both miniconda and Anaconda are packaged with the Anaconda Prompt to be used in Windows. Within typical installations, this restricts the use of the conda command to only within this prompt. Depending on your convenience, it may be a wise choice to add the conda command to your path during the installation by checking the appropriate checkbox. This would allow conda to be used from anywhere in the operating system except for PowerShell

Note

Conda and Powershell don’t seem to be working well together at the moment. There seems to be an issue with Powershell spawning a new command prompt for the execution of every command. This makes the environment activate in a different prompt from the one you may be working with after activation. This may eventually get fixed later on but for now, we would recommend using only the standard cmd.exe on windows.

If you’re using Git Bash on Windows, you might have to add conda to paths to have the conda command available (adjust path to your Conda installation):

. /c/ProgramData/Anaconda3/etc/profile.d/conda.sh

To create a ding0 environment using the yaml file in conda, use the command:

conda env create -f ding0_env.yml

By default this environment will be called ding0_env. If you would like to use a custom name for your environment use the following variant of the command:

conda env create -n custom_env_name -f ding0_env.yml

An to activate this environment, from any folder in the operating system, use the command:

conda activate ding0_env

Once the environment is activated, you have two options to install ding0. Either install it from the local repository with the command:

pip install -e \path\to\ding0\

Or install it from the pypi repository with the command:

pip install ding0

Use Ding0

Have a look at the How to use ding0?.