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.
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
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 GCC - software.intel.com GNU gmake - www.gnu.org/software/make/ Boost - www.boost.org zlib - zlib.net openexr - www.openexr.com tbb - threadingbuildingblocks.org cppunit - www.freedesktop.org/wiki/Software/cppunit gflw - www.glfw.org
These packages are installed on different systems in different ways.
Mac OS X
For example, to install a package like tbb using MacPorts one would simply do:
sudo port install tbbin 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 installin the directory where you have unzipped your OpenVDB download and you are off and installing!
To use pyopenvdb make sure the directory where pyopenvdb.so 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!
Mac OS X
General OS Tips