I am trying to use Bloomberg python API. I need to set BLPAPI_ROOT environment variable for this. I added,
export BLPAPI_ROOT="/home/user/Downloads/blpapi_cpp_3.6.3.1"
export PATH=$PATH:$BLPAPI_ROOT
to my .bashrc file and ran source .bashrc. Now, when I open python shell and do,
print os.environ['BLPAPI_ROOT']
it gives me correct output. But when the same this runs inside the setup.py provided, it throws a
Traceback (most recent call last):
File "setup.py", line 27, in <module>
blpapiRoot = os.environ['BLPAPI_ROOT']
File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'BLPAPI_ROOT'
What am I missing here ?
System : Ubuntu 12.04 Python 2.7