Download the latest miniconda version here.
git clone https://github.com/chrwm/kfw-mastr.git
- Check what your python path is
echo %PYTHONPATH%
- Set python path to repository root
set PYTHONPATH=C:\path\to\your\folder_where_you_cloned_the_repo_into
- Check what your python path is
echo $env:PYTHONPATH
- Set python path to repository root
$env:PYTHONPATH = "C:\path\to\your\python\modules"
In miniconda terminal: Navigate to the REPO_ROOT (the folder where you cloned the repo into) and run the conda code below:
conda install mamba -n base -c conda-forge
mamba env create -f environment.yaml
This yields a virtual environment named kfw-mastr
with Python 3.11 and all necessary packages to run the code.
- Download docker for Windows here.
- Start docker as administrator.
- Open
command line
as administrator. - Navigate to repo root.
- Run
docker-compose up
This creates the docker infrastructure.
- In your IDE set
kfw-mastr
as environment. - If you're using the miniconda terminal or
command line
to run the code, then make sure to activate thekfw-mastr
environment with:
conda activate kfw-mastr
- From project root, run
python kfw_mastr/setup_database.py
This creates the database, downloads the Marktstammdatenregister, and sets up the basic tables for calculations.
Note: If python kfw_mastr/setup_database.py
doesn't work, try to run it with path to config.yaml
python kfw_mastr/setup_database.py --config_path "C:\Users\user\your\favourite\path\config_file_can_have_any_name.yaml"