Installation
To install, we suggest first setting up a virtual environment
# Python3
python3 -m venv pyhf
and activating it
source pyhf/bin/activate
Install latest stable release from PyPI…
… with NumPy backend
python -m pip install pyhf
… with TensorFlow backend
python -m pip install pyhf[tensorflow]
… with PyTorch backend
python -m pip install pyhf[torch]
… with JAX backend
python -m pip install pyhf[jax]
… with all backends
python -m pip install pyhf[backends]
… with xml import/export functionality
python -m pip install pyhf[xmlio]
Install latest development version from GitHub…
… with NumPy backend
python -m pip install --upgrade "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf"
… with TensorFlow backend
python -m pip install --upgrade "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[tensorflow]"
… with PyTorch backend
python -m pip install --upgrade "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[torch]"
… with JAX backend
python -m pip install --upgrade "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[jax]"
… with all backends
python -m pip install --upgrade "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[backends]"
… with xml import/export functionality
python -m pip install --upgrade "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[xmlio]"
Updating pyhf
Rerun the installation command. As the upgrade flag (-U
, --upgrade
) is used then the libraries will be updated.