On all platforms, we recommend to install pyGIMLi via the conda package manager contained in the Anaconda distribution. For details on how to install Anaconda, we refer to:

To avoid conflicts with other packages, we recommend to install pygimli in a separate environment. Here we call this environment pg, but you can give it any name. Note that this environment has to be created only once.

Open a terminal (Linux & Mac) or the Anaconda Prompt (Windows) and type:

conda create -n pg -c gimli -c conda-forge pygimli=1.4.6

If you are using Windows or Mac, a new environment named “pg” should be visible in the Anaconda Navigator. If you want to use pyGIMLi from the command line, you have to activate the environment. You can put this line in your ~/.bashrc file so that it is activated automatically if you open a terminal.

conda activate pg

After that you can use pyGIMLi with your text editor of choice and a terminal.

Usage with Spyder or JupyterLab#

Depending on your preferences, you can also install third-party software such as the MATLAB-like integrated development environment (

conda install -c conda-forge spyder

Or alternatively, the web-based IDE JupyterLab (

conda install -c conda-forge jupyterlab

pyGIMLi on Google Colab#

Even though still experimental, pyGIMLi can be run on Google Colab without any installation on the own computer. Just create a new Notebook and install the condacolab package by

!pip install -q condacolab
import condacolab

After doing so, the kernel is automatically restarted, so import condacolab again and install pygimli using conda just as mentioned above.

import condacolab
!conda install -c gimli pygimli=1.4.6

Testing the installation#

To test if everything works correctly you can do the following:

python -c "import pygimli; pygimli.test(show=False, onlydoctests=True)"

Staying up-to-date#

Update your pyGIMLi installation from time to time, if want to have the newest functionality.

conda update -c gimli -c conda-forge pygimli

If there something went wrong and you are running an old, not further supported python version, consider a fresh install in a new clean environment. The only drawback of using conda is that you are bound to the rhythm in which we update the conda packages. In order to work with the latest Python codes you should create an environment with the latest pyGIMLi C++ core only,

conda create -n pgcore -c gimli -c conda-forge pgcore

retrieve the source code by git

git clone
cd gimli

and install pygimli as a development package

conda develop .

Alternatively you could set the PYTHONPATH variable but you would have to care for dependencies by yourself.

Later you can just update the pygimli code by

git pull

Only if you need recent changes to the C++ core, you have to compile pyGIMLi using your systems toolchain as described in


If you want to compile pyGIMLi from source, check out Building from source.