Installation

Installation#

Users can install the current version of OpenDSSDirect.py with pip.

Recommended: Use Miniconda or Anaconda to install Python

Although we recommend new OpenDSS users to install and try the official/EPRI’s distribution of OpenDSS, users are not required to install EPRI’s distribution of OpenDSS to use OpenDSSDirect.py. The engine used in OpenDSSDirect.py and other projects under DSS-Extensions is AltDSS/DSS C-API, which is a version maintained and extended by the community. A future version might also include support for the official OpenDSS binaries (currently Windows only), which of course does not include any of the community extensions.

With pip#

Open a shell or command prompt in your Python environment to use pip.

To follow the notebooks, examples and explore the ecosystem, we recommend using the extra specifier, which will also include AltDSS-Python, Pandas, NetworkX, SciPy, matplotlib, besides DSS-Python:

pip install 'OpenDSSDirect.py[extras]'

On Windows, if you get an error, you may need to use double quotes instead:

pip install "OpenDSSDirect.py[extras]"

Note: Python packages like pandas are optional dependencies of OpenDSSDirect.py. If, for example, you are unable to install pandas using pip, try conda install pandas. If you are unable to install pandas please open an issue on GitHub. Alternatively, you can try the following, to not install the extras dependency.

pip install OpenDSSDirect.py

That is the minimal installation depends only on DSS-Python, and might be useful for more restricted environments.

To upgrade an existing installation:

pip install 'OpenDSSDirect.py[extras]' --upgrade

Development#

If you wish to develop OpenDSSDirect.py, first clone the repository from GitHub.

git clone https://github.com/dss-extensions/OpenDSSDirect.py.git

(Optional: Set up a virtual environment or a conda environment.)

Next install an editable version of OpenDSSDirect.py:

pip install -e '.[extras,dev]' --upgrade

Depending on you system/user shell, you may have to escape the brackets

pip install -e '.\[extras,dev\]' --upgrade

Support#

OpenDSSDirect.py is currently tested and supported on Windows (x86, x64), Mac (x64, M1 and later) and Linux (x86, x64, ARM) machines.