Skip to content

Latest commit

 

History

History
107 lines (59 loc) · 2.34 KB

installation.rst

File metadata and controls

107 lines (59 loc) · 2.34 KB

Installation

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...

... with NumPy backend

pip install pyhf

... with TensorFlow backend

pip install pyhf[tensorflow]

... with PyTorch backend

pip install pyhf[torch]

... with all backends

pip install pyhf[tensorflow,torch]

... with xml import/export functionality

pip install pyhf[xmlio]

Install latest development version from GitHub... -----------------------------------------------------------------------------------------

... with NumPy backend

pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf"

... with TensorFlow backend

pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[tensorflow]"

... with PyTorch backend

pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[torch]"

... with all backends

pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[tensorflow,torch]"

... with xml import/export functionality

pip install --ignore-installed -U "git+https://github.com/scikit-hep/pyhf.git#egg=pyhf[xmlio]"

Updating pyhf

Rerun the installation command. As the upgrade flag, -U, is used then the libraries will be updated.