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...
python -m pip install pyhf
python -m pip install 'pyhf[tensorflow]'
python -m pip install 'pyhf[torch]'
python -m pip install 'pyhf[jax]'
python -m pip install 'pyhf[backends]'
python -m pip install 'pyhf[xmlio]'
Install latest development version from GitHub...
python -m pip install --upgrade 'pyhf@git+https://github.com/scikit-hep/pyhf.git'
python -m pip install --upgrade 'pyhf[tensorflow]@git+https://github.com/scikit-hep/pyhf.git'
python -m pip install --upgrade 'pyhf[torch]@git+https://github.com/scikit-hep/pyhf.git'
python -m pip install --upgrade 'pyhf[jax]@git+https://github.com/scikit-hep/pyhf.git'
python -m pip install --upgrade 'pyhf[backends]@git+https://github.com/scikit-hep/pyhf.git'
python -m pip install --upgrade 'pyhf[xmlio]@git+https://github.com/scikit-hep/pyhf.git'
Rerun the installation command. As the upgrade flag (-U
, --upgrade
) is used then the libraries will be updated.