How to install Bloomberg API Library for Python 2.7 on Mac OS X
<p>I'm trying to setup my Mac OS X system to use the <code>pdblp</code> Python library which requires me to first install the <a href="https://www.bloomberglabs.com/api/libraries/" rel="nofollow">Bloomberg Open API libary for Python</a>. After cloning the git repo and running <code>python setup.py install</code>, I get </p>

<pre><code>File "setup.py", line 20, in &lt;module&gt;
  raise Exception("BLPAPI_ROOT environment variable isn't defined")
Exception: BLPAPI_ROOT environment variable isn't defined
</code></pre>

<p>How should I proceed?</p>

<p>You also need to install the <a href="https://bloomberg.bintray.com/BLPAPI-Experimental-Generic/blpapi_cpp_3.8.1.1-darwin.tar.gz" rel="nofollow">C/C++ libraries</a> and then set BLPAPI_ROOT to the location of the <code>libblpapi3_32.so</code> or <code>libblpapi3_64.so</code> files. For example:</p>

<pre><code>cd /some/directory
wget https://bloomberg.bintray.com/BLPAPI-Experimental-Generic/blpapi_cpp_3.8.1.1-darwin.tar.gz
tar zxvf blpapi_cpp_3.8.1.1-darwin.tar.gz
export BLPAPI_ROOT=/some/directory/blpapi_cpp_3.8.1.1/Darwin
</code></pre>

<p>Then you can proceed with installing the python library.</p>

python osx python-2.7 bloomberg