Install using pip (Windows, macOS, Linux, other)¶
Install Python with pip. Upgrade pip to a recent version using
python -m pip install --upgrade.
If you’re on a supported version of Windows, macOS, or Linux (see the HELICS PyPI page for details) you can then use
pip to install the HELICS Python interface and helics-apps.
pip install 'helics'
pip install 'helics[cli]'
The second version with the “[cli]” additionally installs additional tools that provides an easy method for launching co-simulations that is used in the HELICS User Guide Examples and is recommended.
If you are on an unsupported OS or CPU architecture, you may need to install a copy of HELICS first.
Depending on your OS, there could be a copy in the package manager, or you may need to build HELICS from source.
From there, you can use
pip install helics as above.
The source distributions section of the PyPI page has some additional useful information on this process.
Install using Spack (macOS, Linux)¶
Install Spack (a HELICS package is included in the Spack develop branch and Spack releases after v0.14.1).
Run the following command to install HELICS (this may take a while, Spack builds all dependencies from source!):
spack install helics
To get a list of installation options, run:
spack info helics
To enable or disable options, use
~. For example, to build with MPI support on the command run would be:
spack install helics +mpi