Download and installation¶
Calliope has been tested on Linux, macOS, and Windows.
Running Calliope requires four things:
The Python programming language, version 3.8 or 3.9.
A number of Python add-on modules (see below for the complete list).
A solver: Calliope has been tested with CBC, GLPK, Gurobi, and CPLEX. Any other solver that is compatible with Pyomo should also work.
The Calliope software itself.
Recommended installation method¶
The easiest way to get a working Calliope installation is to use the free
conda package manager, which can install all of the four things described above in a single step.
conda, download and install the “Miniconda” distribution for your operating system (using the version for Python 3).
With Miniconda installed, you can create a new environment called
"calliope" with all the necessary modules, including the free and open source GLPK solver, by running the following command in a terminal or command-line window
$ conda create -c conda-forge -n calliope calliope
This will install calliope with Python version 3.9. Due to incompatabilities between packages that Calliope relies upon, it is only possible to install this version of Calliope on Python versions 3.8 and 3.9.
To use Calliope, you need to activate the
calliope environment each time
$ conda activate calliope
You are now ready to use Calliope together with the free and open source GLPK solver. However, we recommend to not use this solver where possible, since it performs relatively poorly (both in solution time and stability of result). Indeed, our example models use the free and open source CBC solver instead, but installing it on Windows requires an extra step. Read the next section for more information on installing alternative solvers.
Windows users may have trouble with the recommended installation method, due to conda not solving the environment successfully.
If this occurs, we recommend using the more efficient reimplementation of
First install mamba in your base conda environment (
conda install -c conda-forge -n base mamba), then proceed with the installation as before, simply using
mamba in place of
mamba create -c conda-forge -n calliope calliope).
Although possible, we do not recommend installing Calliope directly via
pip install calliope).
Non-python binaries are not installed with
pip, some of which are necessary for stable operation (e.g., libnetcdf).
Updating an existing installation¶
If following the recommended installation method above, the following command, assuming the conda environment is active, will update Calliope to the newest version
$ conda update -c conda-forge calliope
You need at least one of the solvers supported by Pyomo installed. CBC (open-source) or Gurobi (commercial) are recommended for large problems, and have been confirmed to work with Calliope. Refer to the documentation of your solver on how to install it.
CBC is our recommended option if you want a free and open-source solver. CBC can be installed via conda on Linux and macOS by running
`conda install -c conda-forge coincbc`. Windows binary packages are somewhat more difficult to install, due to limited information on the CBC website, but can be found within their binary archive and are included in their package releases on GitHub. The GitHub releases are more up-to-date. We recommend you download the relevant binary for CBC 2.10.8 and add cbc.exe to a directory known to PATH (e.g. an Anaconda environment ‘bin’ directory).
GLPK is free and open-source, but can take too much time and/or too much memory on larger problems. If using the recommended installation approach above, GLPK is already installed in the
calliope environment. To install GLPK manually, refer to the GLPK website.
Gurobi is commercial but significantly faster than CBC and GLPK, which is relevant for larger problems. It needs a license to work, which can be obtained for free for academic use by creating an account on gurobi.com.
While Gurobi can be installed via conda (
conda install -c gurobi gurobi) we recommend downloading and installing the installer from the Gurobi website, as the conda package has repeatedly shown various issues.
After installing, log on to the Gurobi website and obtain a (free academic or paid commercial) license, then activate it on your system via the instructions given online (using the
Another commercial alternative is CPLEX. IBM offer academic licenses for CPLEX. Refer to the IBM website for details.
Python module requirements¶
Refer to requirements/base.yml in the Calliope repository for a full and up-to-date listing of required third-party packages.
Some of the key packages Calliope relies on are: