0

I have tried to follow the successful folks processes as described in several prior posts, but no success; a tribute to a most obscure install process.

  • I've installed blpapi via pip, it reported successfully installed, and shows up in the library list.
  • I unzipped the blpapi package from BBG to C:blpapi_cpp; and added C:blpapi_cpp\blpapi_cpp_3.12.3.1\bin to my Win 7 PATH variable.
  • I installed the latest version of Visual Studio Tools (2019)
  • I successfully installed the SSH key from BBG

I re-started Anaconda Spyder to make sure it was seeing the latest PATH variable. In the console I tried: import blpapi, and got:

ImportError: 
---------------------------- ENVIRONMENT -----------------------------
Platform: Windows-7-6.1.7601-SP1
Architecture: ('64bit', 'WindowsPE')
Python: 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
Python implementation: CPython

blpapi 64-bit will be loaded from: "None"
blpapi 32-bit will be loaded from: "None"
System PATH: (* marks locations where blpapi was found)

*long list of paths here, ending with* 

    "C:Anaconda3\Scripts"
    "C:blpapi_cpp\blpapi_cpp_3.12.3.1\bin"

blpapi package at: "C:\Anaconda3\lib\site-packages"

Current directory: "C:\Users\Paul Stafford"

----------------------------------------------------------------------
No module named '_versionhelper'

Could not open the C++ SDK library.

Download and install the latest C++ SDK from: 
    http://www.bloomberg.com/professional/api-library

If the C++ SDK is already installed, please ensure that the path to the library
was added to PATH before entering the interpreter.

I thought that that was what I did, but evidently not. I'm not well-versed in setting up environments. Is the C++ SDK in the blpapi_cpp package, visual studio, or? It seems all the bits are there, they're just not finding each other. What did I miss?

halfer
  • 19,824
  • 17
  • 99
  • 186
P Stafford
  • 61
  • 4

2 Answers2

1

This issue which is usually related to not being able to find shared libaries because of improperly set environment variables. I would take a look at installing this via Conda. Try

conda install -c conda-forge blpapi
mgilbert
  • 3,495
  • 4
  • 22
  • 39
1

Hey what version of Python were you using via PIP? Anaconda worked because newest available default was Python 3.7. but with PIP I recall installing Python 3.8 and got same errors as yourself.

The resolution was to install Python 3.7 (make sure to install to path), set the file path to the path variable higher than the existing Python 3.8 so that your CMD uses that version as default, and then suddenly the blpapi install worked fine.