Installing goSPL and its dependencies stack from source can be tedious and difficult.
Installation via Conda#
Important
This is the preferred approach to install goSPL on a local machine.
Warning
For Windows users, first install Linux on Windows with WSL. This should work with most recent versions of Windows (from Windows 10 to 11).
Quick install from the geodels conda channel#
The simplest way to install goSPL is from the pre-built conda package
published on the geodels channel on anaconda.org.
This avoids building goSPL’s Fortran extension locally and pulls every
runtime dependency from conda-forge in one step.
Create a fresh environment and install gospl (and the
conda-forge stack it needs) in one command:
mamba create -n gospl -c geodels -c conda-forge gospl
or with classic conda:
conda create -n gospl -c geodels -c conda-forge gospl
Then activate the environment:
mamba activate gospl # or: conda activate gospl
and verify the install:
python -c "from gospl.model import Model; print('goSPL ready')"
Note
-c conda-forge is required alongside -c geodels so that
petsc4py, mpi4py, pyshtools, vtk and the other
scientific stack resolve from conda-forge. Without it, conda
falls back to the defaults channel which does not carry
compatible builds of these packages.
To install a specific version (e.g. for reproducibility):
mamba create -n gospl -c geodels -c conda-forge gospl=2026.06.08
The two sections below cover the alternative environment.yml
approach, which is useful if you want to add extra packages to the
environment in the same step, work from an editable source checkout, or
track the master branch between releases.
Installing Anaconda#
One of the simplest way to locally install not only goSPL, but required dependencies is with Anaconda, a cross-platform (Linux, Mac OS X, Windows) Python distribution for data analytics and scientific computing.
Note
For Windows users, you will need to install Anaconda via the Windows Ubuntu Terminal from WSL. There are several articles on the web to do so (such as this one)
For other approaches, some installation instructions for Anaconda can be found here.
A full list of the packages available as part of the Anaconda distribution can be found here.
Another advantage of installing Anaconda is that you don’t need admin rights and it can be installed in the user’s home directory, which makes it trivial to delete Anaconda if you decide (just delete that folder).
After getting Anaconda installed, the user will have already access to some essential Python packages and will be able to install a functioning goSPL environment by following the directives below.
Installing Miniconda#
Warning
If you have installed Anaconda already no need to install Miniconda and you can skip this section.
The previous section outlined how to download the Anaconda distribution. However this approach means you will install well over one hundred packages and involves downloading the installer which is a few hundred megabytes in size.
If you want to have more control on which packages, or have a limited internet bandwidth, then installing goSPL with Miniconda may be a better solution.
Conda is the package manager that the Anaconda distribution is built upon. It is a package manager that is both cross-platform and language agnostic (it can play a similar role to a pip and virtualenv combination).
Miniconda allows you to create a minimal self contained Python installation, and then use the conda command to install additional packages.
First you will need Conda to be installed and downloading and running the Miniconda will do this for you. The installer can be found here. It is worth mentioning that for Windows users, the miniconda installation will need to be done through the WSL terminal.
Building goSPL environment#
The next step consists in downloading the conda environment for goSPL. A conda environment is like a virtual environment that allows you to install a specific flavor of Python and set of libraries. For the latest version (master branch) of goSPL, this is done by downloading the environment.yml file. To do this you can use the curl:
curl https://raw.githubusercontent.com/Geodels/gospl/master/environment.yml --output environment.yml
or wget command:
wget https://raw.githubusercontent.com/Geodels/gospl/master/environment.yml
This will save the file locally under the same name as it was on github: environment.yml.
name: gospl
channels:
- conda-forge
dependencies:
- python>=3.11,<3.13
- meson-python>=0.15.0
- setuptools>=61.0
- pkg-config
- numpy
- petsc4py
- scipy
- matplotlib
- numpy-indexed
- pandas
- h5py
- vtk
- ruamel.yaml
- gflex
- mpi4py
- pyshtools
- cython
- c-compiler
- cxx-compiler
- fortran-compiler
- pytest
Alternatively you can get it from your preferred web browser by clicking on the following link: environment.yml and saving it under the following name environment.yml.
Note
pyshtools is required: the flexural-isostasy module switched from the older isoFlex Python wrapper to a direct pyshtools-based spherical-harmonic implementation. meshio and pyproj are no longer required dependencies.
Note
goSPL is now also available as a pre-built Conda package on the
geodels channel — see Quick install from the geodels conda channel above for the
one-line install. The environment.yml approach below remains
useful when you want to follow the master branch directly, work
from an editable source checkout, or extend the environment with
additional packages in one step.
Once the environment.yml file has been downloaded on your system. The following directives provide a step-by-step guide to create a local conda environment for goSPL.
Navigate to the directory containing the environment.yml file and run the following commands from a terminal window:
conda env create -f environment.yml
This will create an environment with the dependencies and packages required to run goSPL.
To put yourself inside this environment run:
source activate gospl
To install other packages, jupyter for example:
conda install jupyter
If you need packages that are available via pip but not conda, then
the pip library is already installed, and can be used to install those packages:
pip install django
To remove the environment, in your terminal window or an Anaconda Prompt, run:
conda remove --name gospl --all
To verify that the environment was removed, in your terminal window or an Anaconda Prompt, run:
conda info --envs
The gospl conda environment should not be in your list of environment anymore.
Alternative goSPL installation#
You might want to try another branch/version of goSPL. To do so you could once your conda environment has been activated run the following:
pip install git+https://github.com/Geodels/gospl.git@NAME
where NAME needs to be replaced by the branch/version you want to try.
Alternatively, you could clone or download the goSPL repository and run the following command in the repository directory:
pip install --no-build-isolation -e .
Building goSPL full stack environment#
The full stack environment contains not only the libraries used for running goSPL, but also the ones for making the pre- and post-processing. It can be installed in a similar fashion as the one described above using the following environment.yml file.
name: gospl
channels:
- conda-forge
dependencies:
- python>=3.11,<3.13
- meson-python>=0.15.0
- setuptools>=61.0
- pkg-config
- numpy
- petsc4py
- pip
- scipy
- matplotlib
- numpy-indexed
- pandas
- h5py
- meshio
- vtk
- pre-commit
- ruamel.yaml
- mpi4py
- cython
- c-compiler
- cxx-compiler
- fortran-compiler
- meshplex
- gflex
- netcdf4
- xarray
- pyshtools
- uxarray
- pyinterp
- jigsawpy
- stripy
- xesmf
- mpas_tools
- pygmt
- rasterio
- pysheds
- seaborn
- pyevtk
- basemap
- numba
- shapely
- pyvista
- pyproj
- triangle
- pytest
- pip:
- git+https://github.com/Geodels/gospl.git
This conda environment will allow you to run all the examples provided in this repository.