Installing pandapower

Tags
Research
Last edited time
May 6, 2024 1:27 PM

🏠 Back Home | 📚 Publications | ✉️ Contact | 📝 Blog

Introduction

pandapower is a powerful open-source library for static modeling of power systems.

Installation

📝

This installation procedure assumes that conda or mamba are available in your operating system. Also, this procedure has been validated in Windows only.

  1. Open a new terminal (with administrator rights, if on Windows). Create a new Python environment (called <env_name>) with Python < 3.10.
  2. conda create -n %ENV_NAME python=3.10
  3. Activate the created environment.
  4. mamba activate %ENV_NAME

    Then, install numba via mamba.

    mamba install numba==0.56.4

    We require this particular version of numba to avoid a compatibility bug.

    The installation of numba through pip is discouraged since it depends on some C libraries that might not be compiled properly if installed otherwise. For more information, consult the numba documentation.

  5. Create a new plain text file called requirements.txt. Open the file and paste the contents below in the file.
  6. Contents of requirements.txt
  7. Install the requirements in the file requirements.txt by navigating with a terminal to the folder where the text file was created and executing the following command:
  8. pip install -r requirements.txt
  9. Install seaborn and igraph for plotting, pytest for testing, tabulate for pretty table printing, and matpowercaseframes to read cases from MATPOWER.
  10. pip install seaborn igraph pytest tabulate matpowercaseframes
  11. Install pandapower. The latest release version can be installed via pip by:
  12. pip install pandapower
    Installing Latest Development Version
  13. (Optional) Install Jupyter Lab.
  14. pip install jupyterlab

    If VSCode is the IDE of preference, install ipykernel

    pip install ipykernel

    The previous installation is also possible via conda or mamba.

    mamba install ipykernel
  15. Test your pandapower installation by running either of the following sample codes:
  16. Simple Power Flow Script
    Import Modules
    Running Tests

2024 © Sergio A. Dorado-Rojas