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.


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.

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#

  1. Open GAMS Studio → go to Help > About → copy the install path (e.g., C:\GAMS\40.1)

  2. Search for Environment Variables in the Start Menu and open it.

  3. In the System Properties window:

    • Click Environment Variables

    • Under System Variables, select Path and click Edit

    • Click New, then paste the GAMS path

  4. Click OK and close all dialogs.

  5. Open a new Command Prompt and test:

    gams
    

On macOS#

  1. Locate your GAMS installation (e.g., /Applications/GAMS40.1)

  2. Open Terminal and run:

    nano ~/.zshrc
    
  3. Add the following line:

    export PATH="/Applications/GAMS40.1:$PATH"
    
  4. Save and apply changes:

    source ~/.zshrc
    gams
    

You should now be able to run GAMS from the terminal.



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.