macOS Setup#

Install prerequisites#

Install Git and uv. On macOS, the standalone uv installer is:

curl -LsSf https://astral.sh/uv/install.sh | sh

Open a new terminal if uv is not yet on your PATH.

Before using Python 3.14, follow the macOS build prerequisites in Installation options.

Create the development environment#

Run these commands from the directory where you keep your projects. If you will contribute through a fork, substitute your fork’s clone URL.

git clone https://github.com/pymedphys/pymedphys.git
cd pymedphys
uv python install 3.14
uv sync --python 3.14 --locked
uv run pre-commit install

The current source supports Python 3.12, 3.13, and 3.14. Python 3.14 matches the quick CI run. uv can install Python for you, so a separate Python or pipx installation is not required.

uv sync creates the repository’s .venv and installs an editable copy of PyMedPhys with the contributor dependencies. Run project commands with uv run from the repository root.

Install Pandoc if needed for notebook or document conversion (for example, brew install pandoc with Homebrew). FreeTDS and Cython are not general setup prerequisites: additional build tools may be needed if a dependency has no wheel for your Python version and platform. Follow that package’s build instructions if installation reports a source-build failure.

Next steps#