python blpapi安装错误

时间:2015-08-15 16:40:41

标签: python blpapi

我正在尝试根据README中的说明为python安装blpapi-3.5.5,但是在运行时

python setup.py install

我收到以下错误:

running install
running build
running build_py
running build_ext
building 'blpapi._internals' extension 
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/erlend/blpapi_cpp_3.8.8.1/include/include -I/home/erlend/anaconda/include/python2.7 -c blpapi/internals_wrap.cxx -o build/temp.linux-x86_64-2.7/blpapi/internals_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
blpapi/internals_wrap.cxx:3110:26: fatal error: blpapi_types.h: No such file or directory
 #include "blpapi_types.h"
                      ^
compilation terminated.
error: command 'gcc' failed with exit status 1

1 个答案:

答案 0 :(得分:5)

BLPAPI Python SDK是C / C ++ SDK的包装器,作为README文件文档,您需要使用该SDK(下载和解压缩)并设置BLPAPI_ROOT环境变量以指示C /的位置C ++ SDK。

您指出的错误消息显示无法找到C / C ++ SDK中的头文件,因此未正确配置某些内容。请确保您的系统上已解压缩最新的C / C ++ SDK,并且已将BLPAPI_ROOT变量设置为指向其位置。设置该变量后,命令:

ls $BLPAPI_ROOT/include

应该导致头文件列表,包括blpapi_types.h。