Installation

Please select one of the following installation methods that best suits your workflow.

Note

If you are a beginner in Python, please note that the commands below must be executed in a terminal, not in the Python console. This is indicated by the $ or C:> prompt as opposed to the Python console prompt >>>.

Using pip

roseau-load-flow is available on PyPI. It can be installed using pip with:

C:> python -m pip install roseau-load-flow
$ python -m pip install roseau-load-flow

Tip

It is recommended to work in a virtual environment to isolate your project. Create and activate a virtual environment before installing the package. You can create one with:

C:> python -m venv .venv
$ python -m venv .venv

A folder named .venv will be created. To activate the virtual environment, run:

C:> .venv\Scripts\activate
$ source .venv/bin/activate

To upgrade to the latest version (recommended), use:

C:> python -m pip install --upgrade roseau-load-flow
$ python -m pip install --upgrade roseau-load-flow

Optional dependencies can be installed using the available extras. These are only needed if you use the corresponding functions. They can be installed with the python -m pip install roseau-load-flow[EXTRA] command where EXTRA is one of the following:

  1. plot: installs matplotlib for the plotting functions

  2. graph installs networkx for graph theory analysis functions

Using pip in Jupyter Notebooks

If you are using Jupyter Notebooks, you can install roseau-load-flow directly from a notebook cell with:

In [1]: %pip install roseau-load-flow

This installs the package in the correct environment for the active notebook kernel.