Python 2.7 with Bloomberg API import blpapi failure

前端 未结 3 1199
失恋的感觉
失恋的感觉 2020-12-20 18:03

This is my development environment:

  • Windows 7 on a 64-bit HP Pavilion laptop
  • Python 2.7, 32-bit in folder C:\\python27
  • Development environmen
3条回答
  •  死守一世寂寞
    2020-12-20 18:41

    I encountered a similar problem, and spent some time troubleshooting the issue with Bloomberg helpdesk. Here's what I learnt:

    The ImportError is the result of Bloomberg not being able to find the "blpapi3_32.dll" DLL file. This DLL file can be located under the \bin or \lib folder of Bloomberg's C/C++ library, which is at the same location where you got your Python executable. So go download that library (v3.7.5.1 as of this writing), and have your system's "Path" environment variable include that location. This should resolve the issue.

    PS you can access the PATH variable via Start > right-clicking "Computer" > Properties > Advanced System Settings > Advanced (tab) > Environment Variables > look for the "Path" variable under "System variables". Edit this variable to include the location of the DLL file, e.g. if the original Path variable is "C:\Python27\Lib\site-packages\PyQt4", then new Path variable should be "C:\Python27\Lib\site-packages\PyQt4;C:\blp\API\blpapi_cpp_3.7.5.1\bin"

提交回复
热议问题