The installation of the MESSAGE-ix platform with dependencies, Anaconda (Miniconda), GAMS and Jupyter notebook, is documented at https://docs.messageix.org/en/stable/index.html. However, the installation and running of the software require prerequisite knowledge and skills for troubleshooting.
The installation steps are outlined below:
MESSAGE-ix requires a GAMS solver and license for optimization. After applying for a student's license to [email protected], the license file is retrieved from https://portal.gams.com/ using the username and password provided. Another way is to request a demo license from https://www.gams.com/try_gams/.
During installation, select Advanced
mode and add GAMS to the PATH
.
I recommend installing Miniconda as many of the Anaconda packages are not necessary (such as the Anaconda Navigator) to run MESSAGE-ix. Make sure that you install Miniconda for Python version 3.8 from https://docs.conda.io/en/latest/miniconda.html.
After installing Miniconda, run Anaconda prompt
from the start icon in the taskbar.
The main purpose is to reduce the time required for searching packages in the channels.
conda config --prepend channels conda-forge
MESSAGE-ix should be run in a new environment other than the base.
conda create --name message_env
conda activate message_env
Although the documentation recommends a conda installer, the version differences of Python make installation much longer than normal. To overcome this problem, we install pip if it is not already installed with Anaconda (Miniconda).
conda list pip
conda install pip
To minimize troubleshooting requirements, installation of the most recent version from git is recommended (iiasa/message_ix#660). However, git installation also upgrades the Python version which should be downgraded again to 3.8.
conda list git
conda install git
conda list python
conda install python=3.8.16
We install the latest version of the MESSAGE-ix platform from git together with pyam-iamc
for reporting modeling outputs.
pip install git+https://github.com/iiasa/message_ix.git@main
pip install pyam-iamc
The installation of the MESSAGE-ix platform should be checked to avoid any discrepancies.
message-ix show-versions
message-ix platform list
The tutorials include the hypothetical world of Westeros (let there be light) and the Austrian electricity system. Install the tutorial files inside a directory accessible by the Anaconda prompt.
message-ix dl Miniconda3/tutorial
The tutorial files are run from Jupyter notebook and require installation if it was not installed by Anaconda (Miniconda).
conda list nb_conda
conda install nb_conda
The tutorial files are run from Jupyter notebook. Select the tutorial file from the browser running the Jupyter notebook. Make sure that the message environment is selected in the browser.
Start with westeros_baseline.ipynb
from tutorial files and proceed by running the cells sequentially.
The connection with ixmp
database of MESSAGE-ix uses Java code and is prone to errors from Turkish characters (iiasa/ixmp#436). The code for creating an instance of the ixmp database should be modified to fix the locale to English.
mp = ixmp.Platform(name="default", jvmargs="-Duser.language=en")