Installation¶
Use this page to install PyHazards, verify that the package imports correctly,
and choose the right setup path for local use or contribution. PyHazards
supports Python 3.8 through 3.12 and installs with pip.
Requirements¶
Python
>=3.8, <3.13PyTorch
>=2.3, <3.0
Install from PyPI¶
Install from PyPI:
pip install pyhazards
GPU Install¶
If you plan to run on GPU, install a matching PyTorch build first and then install PyHazards.
Example for CUDA 12.6:
pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install pyhazards
Install from Source¶
Use an editable install when you are contributing code or documentation:
git clone https://github.com/LabRAI/PyHazards.git
cd PyHazards
python -m pip install -e .
Verify the Installation¶
Run a small import check to confirm that the package is available in the environment:
python -c "import pyhazards; print(pyhazards.__version__)"
You should see the installed package version printed to stdout.
Next Steps¶
Continue to Quick Start for the first end-to-end workflow.
See Implementation Guide if you are setting up a contributor workflow.