swmmx Documentation

Installation

Install swmmx from PyPI, then install the scientific packages used by the workflows you plan to run. The package intentionally keeps third-party scientific dependencies lightweight so it does not unexpectedly reshape an existing engineering Python environment.

python -m pip install swmmx

Runtime Scientific Dependencies

python -m pip install numpy pandas matplotlib networkx

Optional GIS Dependencies

GIS import and export lazily require GeoPandas and Shapely.

python -m pip install geopandas shapely

Optional Excel Dependency

python -m pip install openpyxl

Native SWMM Engines

PlatformEngine behavior
Windows 64-bitBundled swmm5.dll.
Linux 64-bitBundled libswmm5.so.
macOSBundled libswmm5.dylib.
from swmmx import swmm

m = swmm("model.inp", custom_dll_path="/path/to/swmm5")
m.run()

Troubleshooting

SymptomLikely fix
Missing NumPy, pandas, matplotlib, or NetworkXInstall the runtime dependencies above in the active environment.
SWMM engine not foundUse a supported bundled platform or pass custom_dll_path.
GIS import/export dependency errorInstall geopandas and shapely.
Excel export dependency errorInstall openpyxl.
Plot window does not appearCheck the matplotlib backend, or call plotting functions with show=False and save_path=....