Setup your Python environment#

In this section you learn how to prepare your python installation.

Installation#

Make sure you have installed your favorite python distribution as well as a code editor on your machine. A lightweight python installation is, for example, miniforge. Then you can follow these steps to create an environment and install the required dependencies:

  1. Create a new folder on your machine.

  2. Download the environment.yml file from the GitHub repository and save it to the new folder OR create an environment.yml in your folder manually and copy the following contents into it:

    name: exergy-env
    channels:
    - conda-forge
    dependencies:
    - python==3.10
    - pip
    - pip:
      - git+https://github.com/oemof/tespy.git@0b6558d3ee6be0c8451f93ad7956639639853826
      - notebook
    
  3. Open the miniforge3 prompt and navigate into that folder with cd /path/to/the/folder

  4. Create and prepare the environment conda env create -f environment.yml

  5. Activate your environment using conda activate exergy-env

Working with jupyter-notebooks#

It is possible to edit the notebooks in code editors (e.g. in VS Code) or in the browser. To learn more about how to use them, you can check out the respective section in the online documentation of jupyter.

Note

If you installed all dependencies into your python environment as described in the steps above, you do NOT need to install the jupyter notebook package separately.