Install & Compatibility
Where this runs
tested against v1.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 3.418s · 254.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 9.1s · import 3.178s · 247MB
256MB installed
● package 256MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Gaussian
✓ from gstools import Gaussian
Standard import for Gaussian covariance model.
Basic random field generation with Gaussian covariance model.
import gstools as gs
import numpy as np
# Create a Gaussian covariance model
model = gs.Gaussian(dim=2, var=1.0, len_scale=10.0)
# Generate a random field
x = np.linspace(0, 100, 50)
y = np.linspace(0, 100, 50)
seed = gs.random.MasterRNG(20170519)
field = gs.SRF(model, seed=seed)
# Evaluate field on a grid
pos = (x, y)
field(pos)
print(field.field.shape) # Should be (50, 50)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'gstools'
Package not installed.
fixRun pip install gstools or conda install -c conda-forge gstools.
ImportError: cannot import name 'Gaussian' from 'gstools'
Incorrect import path. Gaussian is a covariance model class.
fixUse from gstools import Gaussian.
ValueError: The 'seed' argument must be a MasterRNG instance, not an integer.
Using a plain integer as seed in SRF.
fixUse gs.random.MasterRNG(seed_value) to wrap the seed.
Upgrade
Version history
1.7.0latest on PyPI · released Apr 28, 2025
Audit
Dependencies
numpyrequiredCore dependency for array operations.
scipyrequiredUsed for interpolation and optimization.
meshiorequiredFor mesh handling and VTK export.
emceeoptionalRequired for Bayesian inference in variogram fitting.
pykrigeoptionalAlternative kriging backend.
gstools-coreoptionalRust-based acceleration (optional, used if installed).