如何在Mac OS X上安装适用于Python 2.7的Bloomberg API库 [英] How to install Bloomberg API Library for Python 2.7 on Mac OS X
问题描述
我正在尝试将Mac OS X系统设置为使用pdblp
Python库,这要求我首先安装 Bloomberg适用于Python的Open API库.克隆git repo并运行python setup.py install
后,我得到
I'm trying to setup my Mac OS X system to use the pdblp
Python library which requires me to first install the Bloomberg Open API libary for Python. After cloning the git repo and running python setup.py install
, I get
File "setup.py", line 20, in <module>
raise Exception("BLPAPI_ROOT environment variable isn't defined")
Exception: BLPAPI_ROOT environment variable isn't defined
我应该如何进行?
推荐答案
您还需要安装 C/C ++库,然后将BLPAPI_ROOT设置为libblpapi3_32.so
或libblpapi3_64.so
文件的位置.例如:
You also need to install the C/C++ libraries and then set BLPAPI_ROOT to the location of the libblpapi3_32.so
or libblpapi3_64.so
files. For example:
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
export BLPAPI_ROOT=/some/directory/blpapi_cpp_3.8.1.1/Darwin
export BLPAPI_ROOT=/some/directory/blpapi_cpp_3.8.1.1
然后,您可以继续安装python库.
Then you can proceed with installing the python library.
这篇关于如何在Mac OS X上安装适用于Python 2.7的Bloomberg API库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!