Skip to main content
Version: 4.x

Installation

We recommend using prebuilt bindings if they are available for your programming language. Bindings for Go, Java, JavaScript, Python, and others are available.

Package managers

Using PyPi, run:

pip install h3

Using Conda, run:

conda config --add channels conda-forge
conda install h3-py

Install from source

First, clone the repository or download the source and check out the latest release:

git clone https://github.com/uber/h3.git
cd h3
git checkout v$(<VERSION)

Note: You must install build dependencies for your operating system.

First make sure you have the developer tools installed and then run:

# Installing the bare build requirements
brew install cmake
# Installing useful tools for development
brew install clang-format lcov doxygen

Next, build the library:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

Optionally, to run H3's test suite, run:

ctest

By default, the filter applications are built when you build H3. Confirm they are working by running:

./bin/latLngToCell --lat 14 --lng -42 --resolution 2