Skip to content

Installation

D-EcoImpact is a command line operated model. To use D-EcoImpact (currently) an installation of Python and the used libraries is required. This is best achieved by installing D-EcoImpact in a virtual environment.

Anaconda, miniConda or Visual Studio Code

Anaconda (elaborate functionality) and minicoda (minimum functionality) are environment managers often used in combination with Python. You can find the installation for either here:

Installation of D-EcoImpact with Anaconda or miniConda

  1. Open your commandline (cmd) or conda prompt, and execute: sh $ conda create -y -c conda-forge --name <env_name> poetry python=3.11

  2. Activate the newly created environment sh $ conda activate <env_name>

  3. Move to the folder where you have placed the D-EcoImpact source code You can use cd ../ and cd to move to the location or use windows explorer and type “cmd” + enter in the path bar.

  4. To install the required libraries Poetry is used. Poetry makes use of the poetry.lock and pyproject.toml (present in the D-EcoImpact folder) to find these required libraries. Execute the following command: poetry install NB. If errors occur while installing the libraries, this might have to do with your administrative rights. Either start the cmd or conda promt “As administrator” or discuss this with your IT support.

  5. Now D-EcoImpact is setup for use. You can test this by executing one of the input yaml files. To execute use the following in the command prompt while your environment is active: python main.py <your_input_file>.yaml

Installation D-Ecoimpact with Visual Studio Code and venv

  1. Install [Python version 3.11.2] (https://www.python.org/downloads/)
  2. Open Visual Studio Code.
  3. Press CRTL + Shift + P and type “Python: Create Environment” followed by enter, select “Venv”.
  4. Place the environment in the D-EcoImpact folder.
  5. Press CTRL + Shift + P and type “Python: Select interpreter” and select the newly created environment.
  6. In the terminal in Visual Studio Code execute the following command: pip install poetry
  7. In the terminal in Visual Studio Code execute the following command: poetry install
  8. Now D-EcoImpact is setup for use. You can test this by executing one of the input yaml files. To execute use the following in the command prompt while your environment is active: python main.py <your_input_file>.yaml