Make sure you have installed or loaded a python version that is 3.7 or later but not newer than 3.10 (see also Before you continue). Use a pip version that is up-to-date (to update run pip install -U pip). Also make sure that the location to which the python binaries of ESM-Tools will be installed (which is ~/.local/bin by default) is in your PATH. For that purpose, add the following lines to one of your login or profile files, i.e. ~/.bash_profile, ~/.bashrc, ~/.profile, etc.:

$ export PATH=$PATH:~/.local/bin
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8

Installing in local environment

After downloading the ESM-Tools software (see Get ESM-Tools) you have a new folder named esm_tools. In this new folder you find the script to install ESM-Tools on the HPC your are running this install script on.

To change into the new folder and execute the instalation script, execute the following commands:

$ cd esm_tools
$ ./

This should install all necessary python packages of ESM-Tools. If you wonder where they end up, take a look at ~/.local/lib/python%versionnumber%/site-packages.

To see where ESM-Tools are installed, run the following command:

$ which esm_tools

A possible (default) output can be ~/.local/bin/esm_tools.

Installing using pip


Installing in a conda environment

Work in progress. We are still testing it.

Update ESM-Tools

If you installed in editable mode as described above, you can update ESM-Tools by using git:

$ cd esm_tools
$ git pull origin release

Uninstall ESM-Tools

We are sorry to see you go! To uninstall your current installation make sure you have the most recent version of pip available for your system:

$ python3 -m pip install -U pip

Then, you can use use the following command to uninstall all ESM-Tools packages:

$ pip freeze | grep esm | xargs pip uninstall -y

You can also choose to manually uninstall. In order to do that, remove the installed Python packages and delete the esm_* executables. The following commands will do the trick if you installed with the script or installed using pip with user mode

$ rm -ri ~/.local/bin/esm*
$ rm -ri ~/.local/lib/python3.<version>/site-packages/esm*

Note that you may have a different Python version, so the second command might need to be adapted. You may also use pip to uninstall any of the packages:

$ pip uninstall [--user] esm-tools

The --user flag may be required when using pip if you are not uninstalling in either a virtual environment or a global install (you would need to be root in that case).