Installing SpatialDeform¶
SpatialDeform requires Python 3.10 or newer. A virtual environment is strongly recommended so GeoPandas, NumPy, SciPy, and scikit-learn do not conflict with system packages.
Optional Rust acceleration¶
For landmark-scale MDS or repeated large distance-matrix fits, install the Rust extra:
The estimator and spatial_smacof(..., backend="auto") select the native
kernel automatically. The normal installation remains pure Python and uses the
same NumPy/SciPy fallback. Confirm the active capability with:
Choose an installation source¶
SpatialDeform is currently an alpha project and has not yet been released to PyPI. Install from GitHub for now. Once a release is available, the PyPI commands below become the recommended route.
With uv:
uv add "spatialdeform @ git+https://github.com/jasoncpit/dynamic-street-network.git#subdirectory=spatialdeform"
With pip:
With uv:
With pip:
Platform activation commands¶
Verify the installation¶
python -c "import spatialdeform; print(spatialdeform.__version__)"
python -c "from spatialdeform import SpatialDeformer; print(SpatialDeformer())"
Expected version for this documentation:
For a fuller environment report:
python - <<'PY'
import geopandas
import numpy
import scipy
import shapely
import sklearn
import spatialdeform
for package in (spatialdeform, geopandas, shapely, numpy, scipy, sklearn):
print(f"{package.__name__:16} {package.__version__}")
PY
Runtime dependencies¶
| Dependency | Minimum | Purpose |
|---|---|---|
| Python | 3.10 | runtime |
| GeoPandas | 0.14 | geographic tabular input and CRS transformation |
| Shapely | 2.0 | LineString and MultiLineString geometry |
| NumPy | 1.24 | numerical arrays and linear algebra |
| SciPy | 1.10 | shortest paths, distance trees, and matrix solves |
| scikit-learn | 1.3 | estimator conventions and validation helpers |
Binary wheels are available for these dependencies on common Python/platform combinations. If an installer starts compiling NumPy, SciPy, Shapely, or GeoPandas locally, first update the installer and try again:
Build a distribution locally¶
The project uses the native uv_build PEP 517 backend:
This produces a wheel and source archive in dist/. Test the wheel in an
isolated environment:
uv run --isolated --no-project \
--with dist/spatialdeform-0.1.0a1-py3-none-any.whl \
tests/smoke_test.py
Version compatibility¶
SpatialDeform supports Python 3.10–3.13 in continuous integration. Python 3.14 will be added after the full geospatial dependency stack publishes compatible wheels.