1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
.. _usage-installation:
Installation
============
Boost-histogram (`source <https://github.com/scikit-hep/boost-histogram>`__) is
a Python package providing Python bindings for Boost.Histogram_ (`source
<https://github.com/boostorg/histogram>`__).
.. _Boost.Histogram: https://www.boost.org/doc/libs/release/libs/histogram/doc/html/index.html
You can install this library from
`PyPI <https://pypi.org/project/boost-histogram/>`__ with pip:
.. code-block:: bash
python -m pip install boost-histogram
or you can use Conda through
`conda-forge <https://github.com/conda-forge/boost-histogram-feedstock>`__:
.. code-block:: bash
conda install -c conda-forge boost-histogram
All the normal best-practices for Python apply; you should be in a
virtual environment, etc.
If you built from source, you can quickly verify the build with:
.. code-block:: bash
python -m boost_histogram.test
Or, from Python:
.. code-block:: python
import unittest
assert unittest.main("boost_histogram.test", warnings="error", exit=False).result == 0
Supported platforms
-------------------
Binaries available:
^^^^^^^^^^^^^^^^^^^
The supported platforms are listed in the README - All common linux
machines, all common macOS versions, and all common Windows versions.
Conda-Forge
^^^^^^^^^^^
The boost-histogram package is available on Conda-Forge, as well. All
supported versions are available.
::
conda install -c conda-forge boost-histogram
Source builds
^^^^^^^^^^^^^
For a source build, for example from an “sdist” package, the only
requirements are a C++14 compatible compiler. The compiler requirements
are dictated by Boost.Histogram’s C++ requirements: gcc >= 5.5, clang >=
3.8, msvc >= 14.1. You should have a version of pip less than 2-3 years
old (10+).
NumPy is downloaded during the build (enables multithreaded builds).
Boost is not required or needed (this only depends on included
header-only dependencies).This library is under active development; you
can install directly from GitHub if you would like.
.. code-block:: bash
python -m pip install git+https://github.com/scikit-hep/boost-histogram.git@develop
|