Installation

The simplest installation of PyGMI is on Windows, using a pre-built installer at 64-bit.

If you prefer building from source, you can use PyPi or Conda.

Once built using PyPi, running pygmi can be done at the command prompt as follows:

pygmi

If you are in python, you can run PyGMI by using the following commands:

from pygmi.main import main

main()

If you prefer not to install pygmi as a library, download the source code and execute the following command to run it manually:

python quickstart.py

Requirements

PyGMI will run on both Windows and Linux. It should be noted that the main development is done in Python 3.12 on Windows.

PyGMI should still work with Python 3.11.

PyGMI is developed and has been tested with the following libraries in order to function:

  • fiona 1.9.5

  • geopandas 0.14.4

  • h5netcdf 1.3.0

  • matplotlib 3.9.0

  • mtpy 1.1.5

  • natsort 8.4.0

  • numexpr 2.10.1

  • openpyxl 3.1.2

  • psutil 6.0.0

  • pyopengl 3.1.7

  • pyqt5 5.15.10

  • pytest 8.2.2

  • rasterio 1.3.9

  • rioxarray 0.15.6

  • scikit-image 0.24.0

  • shapelysmooth 0.2.0

  • simpeg 0.21.1

PyPi - Windows

Windows users can use the WinPython distribution as an alternative to Anaconda. It comes with most libraries preinstalled, so using pip should be sufficient.

Install with the following command.

pip install pygmi

Should you wish to manually install binaries, related binaries can be obtained at the website by Christoph Gohlke.

If you wish to update GDAL, you will need to download and install:

  • fiona

  • GDAL

  • pyproj

  • rasterio

  • Rtree

  • shapely

All these binaries should be downloaded since they have internal co-dependencies.

PyPi - Linux

Linux normally comes with python installed, but the additional libraries will still need to be installed.

The process is as follows:

sudo apt-get install pipx

pipx ensurepath

pipx install pygmi

Once installed, running pygmi can be done at the command prompt as follows:

pygmi

If you get the following error: qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found., then you can try the following command, since this is Linux issue:

sudo apt-get install libxcb-xinerama0

Anaconda

Anaconda users are advised not to use pip since it can break PyQt5. However, one package is installed only by pip, so a Conda environment should be created.

The process to install is as follows:

conda create -n pygmi python=3.12

conda activate pygmi

conda config –env –add channels conda-forge

conda install pyqt

conda install fiona

conda install matplotlib

conda install psutil

conda install numexpr

conda install rasterio

conda install geopandas

conda install natsort

conda install scikit-image

conda install pyopengl

conda install simpeg

conda install shapelysmooth

conda install openpyxl

conda install h5netcdf

conda install rioxarray

conda install pytest

pip install mtpy

conda update –all

Once this is done, download pygmi, extract (unzip) it to a directory, and run it from its root directory with the following command:

python quickstart.py