Installation#
pysewer uses a two-layer environment:
Native layer (conda/mamba) — the geospatial C-library stack (GDAL, PROJ, GEOS, rasterio, fiona, geopandas, shapely, …) from
environment.yml. Never install these with pip.PyPI layer (uv) — pure-Python dependencies and the editable install of pysewer itself from
pyproject.toml.
We recommend Miniforge (which ships mamba) and uv.
Step 1: Clone the repository#
git clone https://codebase.helmholtz.cloud/wasp/pysewer.git
cd pysewer
Step 2: Create the conda environment (native layer)#
mamba env create -f environment.yml # creates the "pysewer" env
For fully reproducible builds, conda-lock.yml pins the exact conda
layer (regenerate with make lock).
Step 3: Install pysewer with uv (PyPI layer)#
uv pip install --python "$(conda info --base)/envs/pysewer/bin/python" -e '.[dev]'
Alternatively, make env-local performs both steps (see mk/env.mk).
HPC / SLURM systems#
On HPC systems, source the bootstrap script, which creates the environment
under /work/$USER/conda_envs (prefers the lock file) and runs the uv
step:
source bin/bootstrap_env.sh pysewer
Verify the installation#
make doctor # env layering and import checks
python -m pytest tests/ -q # run the test suite