For most use cases, installing from source will be the preferred installation route.
-
Using Git, navigate to a local target directory and clone repository:
git clone https://github.com/NREL/electrolyzer.git
-
Navigate to
electrolyzercd electrolyzer -
Create a new virtual environment and change to it. Using Conda Python 3.13 (choose your favorite supported version) and naming it 'electrolyzer_env' (choose your desired name):
conda create --name electrolyzer_env python=3.13 -y conda activate electrolyzer_env
-
Install electrolyzer and its dependencies:
-
If you want to just use electrolyzer:
pip install . -
If you want to work with the examples:
pip install ".[examples]" -
If you also want development dependencies for running tests and building docs:
pip install -e ".[develop]" -
In one step, all dependencies can be installed as:
pip install -e ".[all]"
-
Developers should add install using pip install -e ".[all]" to ensure documentation testing, and
linting can be done without any additional installation steps.
Please be sure to also install the pre-commit hooks if contributing code back to the main repository via the following. This enables a series of automated formatting and code linting (style and correctness checking) to ensure the code is stylistically consistent.
pre-commit installIf a check (or multiple) fails (commit is blocked), and reformatting was done, then restage
(git add) your files and commit them again to see if all issues were resolved without user
intervention. If changes are required follow the suggested fix, or resolve the stated
issue(s). Restaging and committing may take multiple attempts steps if errors are unaddressed
or insufficiently addressed. Please see pre-commit,
ruff, or isort for more
information.