Prerequisites: Install Required Tools#
This guide explains how to install the essential tools needed to run the EPM model on macOS or Windows.
You’ll need:
Git (to download and manage the code)
GAMS (required to run the model)
Python & Conda (optional, for enhanced functionalities via the Python API)
A code editor (optional, to help navigate and edit the codebase)
1. Git (Version Control System)#
Git is used to download the EPM code from the GitHub repository and manage version updates.
Windows:
Download Git for Windows and install it using default settings.macOS:
Download Git for macOS and follow the installer instructions.Verify installation:
Open Terminal or Command Prompt and run:git --version
2. GAMS (Optimization Engine)#
GAMS is used to solve the energy planning model. A free version with limited capabilities is available for non-commercial use.
Download (all platforms):
https://www.gams.com/download/
Ask your institution or the World Bank team if you need a full license.
Add GAMS to Your System PATH#
This step allows you to call gams
from your terminal or command line.
On Windows#
Open GAMS Studio → go to
Help > About
→ copy the install path (e.g.,C:\GAMS\40.1
)Search for Environment Variables in the Start Menu and open it.
In the System Properties window:
Click
Environment Variables
Under System Variables, select
Path
and clickEdit
Click
New
, then paste the GAMS path
Click OK and close all dialogs.
Open a new Command Prompt and test:
gams
On macOS#
Locate your GAMS installation (e.g.,
/Applications/GAMS40.1
)Open Terminal and run:
nano ~/.zshrc
Add the following line:
export PATH="/Applications/GAMS40.1:$PATH"
Save and apply changes:
source ~/.zshrc gams
You should now be able to run GAMS from the terminal.
3. Python & Conda (Optional but Recommended)#
Python is used to run EPM through its Python API, enabling advanced features such as scenario generation and Monte Carlo analysis.
Install Miniconda (all platforms):
https://docs.conda.io/en/latest/miniconda.html
Download the installer for your operating system and follow the setup instructions.Verify installation:
Open Terminal or Command Prompt and run:python --version conda --version
4. Code Editor (Optional)#
A code editor helps you navigate, compare, and edit model files efficiently—even if you don’t plan to modify the Python code.
Recommended Editors#
These editors also offer:
Git integration to track changes and synchronize with the repository
File diff tools to compare versions
Syntax highlighting and code validation
We especially recommend using them to:
Compare your regional/country version of the model with updates from the main EPM framework
Merge changes when the EPM core is updated to maintain compatibility
By installing these tools, you’ll be ready to run and explore the EPM model both through GAMS Studio and Python scripting.