0

I have almost spent many hours trying to make bloomberg API work with my Python 2.7 installation and still no luck. Bloomberg HelpDesk doesn't support it anymore so there is no help from them. Any help is much appreciated:

C:\Users\user>python
Python 2.7.16rc1 (v2.7.16rc1:baacaac06f, Feb 16 2019, 22:56:10) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import blpapi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\blpapi\__init__.py", line 11, in <module>
    raise debug_load_error(error)
ImportError:
---------------------------- ENVIRONMENT -----------------------------
Platform: Windows-7-6.1.7601-SP1
Architecture: ('64bit', 'WindowsPE')
Python: 2.7.16rc1 (v2.7.16rc1:baacaac06f, Feb 16 2019, 22:56:10) [MSC v.1500 64 bit (AMD64)]
Python implementation: CPython

blpapi 64-bit will be loaded from: "C:\blp\blpapi_cpp_3.12.3.1\bin\blpapi3_64.dll"
blpapi 32-bit will be loaded from: "C:\blp\blpapi_cpp_3.12.3.1\bin\blpapi3_32.dll"
System PATH: (* marks locations where blpapi was found)
    "C:\Program Files\Java\jdk-12.0.2\bin"
    "C:\Python27\"
    "C:\Python27\Scripts"
    "C:\Windows\system32"
    "C:\Windows"
    "C:\Windows\System32\Wbem"
    "C:\Windows\System32\WindowsPowerShell\v1.0\"
  * "C:\blp\blpapi_cpp_3.12.3.1\bin"

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

Current directory: "C:\Users\user"

----------------------------------------------------------------------
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.
Gerry
  • 606
  • 6
  • 16
  • Is there any file matching `*_versionhelper*` on your machine? When you say Bloomberg doesn't support this anymore, do you mean because they require Python 3 now? – John Zwinck Nov 17 '19 at 00:39
  • some search on internet indicated that *_versionhelper* error is due to mismatch in versions of python API and C++ installation. I tried a few permutations. Bloomberg helpdesk does not support Python API (WAPI product). They have a new product where you can run jupyter notebook inside terminal. One of the reasons is to discourage people to download data from Bloomberg on their systems. – Gerry Nov 17 '19 at 14:09
  • Which version of python blpapi package do you use? And why Bloomberg Helpdesk can't support you? – Kevin Liu Jan 20 '20 at 08:27
  • bloomberg helpdesk has stopped supporting python – Gerry Jan 30 '20 at 23:25

2 Answers2

0

This issue 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

Just make sure whatever distribution of python you are interested in is packaged on conda, as discussed here.

mgilbert
  • 3,495
  • 4
  • 22
  • 39
0

I did 2 things to solve an issue similar to that:

1- I installed Microsoft Visual Studio making sure I have the following components:

  • C++/CLI Support
  • VC++ 2015.3 v14.00 (v140) toolset for desktop
  • Visual C++ MFC for x86 and x64
  • Visual C++ ATL for x86 and x64

2- I manually copied the .dll files in C++API\lib (blpapi3_32.dll and blpapi3_64.dll in my case) into C:\windows\system32 where all the dll files that system uses.

Also, I copied the dll files in in C++API\lib into C:\blp\DAPI, replacing the new ones with the old ones.

Somehow, Path variable wasn't successful enough to find the dlls in the API folder.

Cagri
  • 307
  • 3
  • 13