As is abundantly clear to anyone who has spent anytime near a computer, installing packages from the command line is at best a tedious task. This, sadly, is the case for installing the OpenVDB packages needed to use the pyopenvdb library within Python. This tutorial will be updated with instructions for individual operating systems as we figure out how to deal with each one.

Download OpenVDB

Perhaps the easiest step! Download the source code for the OpenVDB set of libraries right here. Note: there is a version of this package in Houdini itself, but we have always used external versions with a yt installation for consistency.

Activate Your yt Install

To use pyopenvdb and yt, make sure yt is installed and activated during your OpenVDB installation process.

To download and install yt go here, and to activate yt simply type the following in the command line:

source /PATH TO YOUR YT INSTALL/bin/activate

Install Dependencies

As listed in the INSTALL file, there are a few required and a few optional dependencies for one to install. We've found we need to install the following:

GNU gmake -
Boost -
zlib -
openexr -
tbb -
cppunit -
gflw -

These packages are installed on different systems in different ways.

Mac OS X

The easiest way to install dependencies on a Mac is with a package manager like MacPorts or Homebrew.

For example, to install a package like tbb using MacPorts one would simply do:

sudo port install tbb
in the command line to install the Thread Building Blocks package, and this package's contents would be installed under the directory structure for your individual install of MacPorts. In my case, this installs everything under /opt/local.

Once you have installed all the listed dependencies, point each dependancy directory in the OpenVDB Makefile to the install locations, type

gmake install
in the directory where you have unzipped your OpenVDB download and you are off and installing!

To use pyopenvdb make sure the directory where is installed is in your PYTHONPATH variable. Something like the following might be useful to put in your .bash_profile to use python and ipython with your pyopenvdb install:

alias python_openvdb="PYTHONPATH=/Users/jillnaiman/openvdb:$PYTHONPATH; python"
alias ipython_openvdb="PYTHONPATH=/Users/jillnaiman/openvdb:$PYTHONPATH; ipython"

An example Makefile for a Mac OS X install can be found right here. Note: you have to change the name from "Makefile_osx" to "Makefile" to use gmake with it.


This is a similar process to the Mac OS X install, however one might want to make use of conda to install several packages. We tried the following during our Linux install:

conda install -c mutirri openexr=2.0.1 
conda install -c trung tbb=4.3_20141023 
conda install -c menpo glfw3=3.0. 
conda install -c brettviren cppunit=1.13.2 4   

More info on this install coming soon, since this was done a little while ago and we need some time to remember what exactly we did!

Other Resources

Mac OS X

Example Makefile for late 2013 iMac, OS 10.11.16

General OS Tips

Simple Analysis Plots

Previous Tutorial

Python VDB Converter

Next Tutorial