Installing from source

System Requirements

On macOS, you need a working modern XCode installation with the XCode Command Line Tools. Additionally, you need CMake and pkg-config:

$ xcode-select --install
$ brew install cmake
$ brew install pkg-config

On Linux, you require gcc 4.8, CMake and pkg-config.

Windows is not yet supported.

Environment Setup

First, clone the mongo-arrow git repository:

$ git clone
$ cd mongo-arrow/bindings/python

Additionally, create a virtualenv in which to install pymongoarrow from sources:

$ virtualenv pymongoarrow
$ source ./pymongoarrow/bin/activate


PyMongoArrow uses libbson. Detailed instructions for building/installing libbson can be found here.

On macOS, users can install the latest libbson via Homebrew:

$ brew install mongo-c-driver


In the previously created virtualenv, we first install all build dependencies of PyMongoArrow:

(pymongoarrow) $ pip install -r requirements/build.txt

We can now install pymongoarrow in development mode as follows:

(pymongoarrow) $ python build_ext --inplace
(pymongoarrow) $ python develop


To run the test suite, you will need a MongoDB instance running on localhost using port 27017. To run the entire test suite, do:

(pymongoarrow) $ python -m unittest discover test