To install, we suggest first setting up a virtual environment
# Python3
python3 -m venv pyhf
# Python2
virtualenv --python=$(which python) pyhf
and activating it
source pyhf/bin/activate
Install latest stable release from PyPI...
pip install pyhf
pip install pyhf[tensorflow]
pip install pyhf[torch]
pip install pyhf[tensorflow,torch]
pip install pyhf[xmlio]
Install latest development version from GitHub... -----------------------------------------------------------------------------------------
pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf"
pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[tensorflow]"
pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[torch]"
pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[tensorflow,torch]"
pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[xmlio]"
Rerun the installation command. As the upgrade flag, -U
, is used then the libraries will be updated.