python blpapi installation error
Asked Answered
L

1

4

I am attempting to install blpapi-3.5.5 for python according to the instructions in the README, but when running

python setup.py install

I get the following error:

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
Lilybel answered 15/8, 2015 at 16:40 Comment(0)
A
7

The BLPAPI Python SDK is a wrapper around the C/C++ SDK, and as the README file documents, you need to have that SDK available (downloaded and unpacked) and the BLPAPI_ROOT environment variable set to indicate the location of the C/C++ SDK.

The error message you've indicated shows that the header files from the C/C++ SDK could not be found, so something is not configured properly. Please ensure that you have the latest C/C++ SDK unpacked on your system, and that you've set the BLPAPI_ROOT variable to point to its location. After setting that variable, the command:

ls $BLPAPI_ROOT/include

Should result in a listing of the header files, including blpapi_types.h.

Aesthetic answered 21/8, 2015 at 21:33 Comment(2)
I'm having a similar issue, but even after setting the environment variable I get the same error. Also - how do you run that command you included exactly? Just open a new cmd window, and paste it in? ThanksAnthocyanin
Has anyone managed to get the above to work? I have added the BLPAPI_ROOT to my environment variables (both user and system) as: BLPAPI_ROOT = C:\blpapi_cpp_3.12.3.1 and even after running Anaconda: C:\blpapi-python-master>python setup.py install I get the same error: fatal error C1083: Cannot open include file: 'blpapi_types.h': No such file or directoryCoarsen

© 2022 - 2024 — McMap. All rights reserved.