Installation

Some Geonomics dependencies (i.e. other Python packages that Geonomics uses) depend in turn on a stack of open-source geospatial libraries in C (GEOS, GDAL, and PROJ).

They can sometimes be tricky to install. Please make sure you have them installed first. Then you can follow the pip installation instructions below.

Installing with pip

If you already have GEOS, GDAL, and PROJ installed, then installing with pip probably will not be an issue.

The pip software can be installed by following the installation instructions on the pip webpage.

Then, Geonomics can be installed using:

pip install geonomics

The installation can then be tested by launching a Python prompt and running:

import geonomics as gnx
gnx.run_default_model()

This will load the Geonomics package, create in your current working directory a new Geonomics parameters file containing the default parameter values, use that file to instantiate and run a Geonomics model, then delete the parameters file (by default).

Dependencies

Required dependencies:

Optional dependencies:


Troubleshooting

Here is a list of issues that we have seen come up during Geonomics installation, each with some suggestions for troubleshooting:

Mac Segmentation Fault

Geonomics installs, but running the default model crashes Python with a segmentation fault:

We have only seen this issue on older Macs (ca. 2012-2015). The segmentation fault appears to be caused by functions within scipy’s interpolate module (e.g. scipy.interpolate.griddata), such as discussed here). The only fix we are aware of, as of now, is to use conda to set up a clean conda environment, then install Geonomics and its dependencies there. While we are not sure why, this appears to make things all better.