Using pyswmm in M1

Abhiram Mullapudi

December 27, 2021

pyswmm in M1

pyswmm does not yet officially support M1. This post outlines the compilation procedure of swmm-python locally on M1 Macs. swmm-python acts as an interface between EPA-SWMM’s simulation engine and pyswmm. We would need this library for running pyswmm in M1 Macs. I would strongly recommend using a python virtual environment for this installation.

As of Dec 29th, 2021, OpenMP is causing issues with the compilation process. So, for now, I have disabled it. I will update the post once I find a way to compile swmm-python with OpenMP1.

Please refer to the cmake file in


brew install ninja
brew install swig
git clone
cd swmm-toolkit
git submodule update --init --recursive
python -m pip install -r build-requirements.txt
python build
python bdist_wheel
python -m pip install dist/swmm_toolkit-0.8.2-cp39-cp39-macosx_11_0_arm64.whl


python -m pip install pyswmm


  • ninja is a light weight build system:
  • swig is an interface better C/C++ and languages like python: swig