我正在尝试让 BLOOMBERG API 在 mac os mojave 10.14 上通过 Python 工作。
我的 Mac 上有 python 2.7.10
我下载了 C/C++ SDK Experimental Release v3.13.1.1 我将内容解压缩到
\Users\hk\blpapi_cpp_3.13.1.1
我将 .bash_profile BLPAPI_ROOT 和 DLYD_LIBRARY PATH 中的环境变量设置为 C/C++ SDK 路径。
然后我通过 pip 安装了 Python API,如本页底部所述:API 库支持 并收到一条成功安装的消息。
使用 import blpapi 时出现以下错误:
File "blpapitest.py", line 5, in <module>
import blpapi
File "/Library/Python/2.7/site-packages/blpapi/__init__.py", line 11, in <module>
raise debug_load_error(error)
ImportError: 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 DYLD_LIBRARY_PATH before entering the interpreter.
我重新检查环境变量 DYLD_LIBRARY_PATH 并将其设置为 C/C++ SDK 文件夹路径 \Users\hk\blpapi_cpp_3.13.1.1
任何解决方案?