python-2.7 - 使用 Bloomberg API 时没有出现名为 _internals 的模块错误

标签 python-2.7 bloomberg blpapi

我目前使用的是 Python 2.7,我的操作系统是 Windows 7。在尝试使用 Bloomberg API 时,我收到了这个错误:

Traceback (most recent call last):
   File "datagrab.py", line 1, in <module>
     import blpapi, time, json
   File "C:\Python27\lib\blpapi\__init__.py", line 5, in <module>
     from .internals import CorrelationId
   File "C:\Python27\lib\blpapi\internals.py", line 50, in <module>
     _internals = swig_import_helper()
   File "C:\Python27\lib\blpapi\internals.py", line 42, in swig_import_helper
     import _internals
   ImportError: No module named _internals

我已将路径变量设置为指向 blpapi3_64.dll 并更新了我的彭博终端。我还将本地 blpapi API 移动到不同的目录,但问题仍然存在。

一般来说,我对这个 API 有点陌生。那么有人可以指导我吗?

先感谢您!

最佳答案

从您的问题看来,您可能已经尝试过了,但只是从 README 中概述了一种可能的解决方案。在 Python Supported Release发布可用here .

Note that many Python installations add the current directory to the module search path. If the Python interpreter is invoked from the installer directory, such a configuration will attempt to use the (incomplete) local blpapi directory as a module. If the above import line fails with the message Import Error: No module named _internals, move to a different directory before invoking python.

关于python-2.7 - 使用 Bloomberg API 时没有出现名为 _internals 的模块错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48908416/

相关文章:

python - smtplib 中的 "No module named email.utils"与 gui2exe

python - 使用selenium返回动态页面的html代码

excel - 从 Excel VBA 调用 Bloomberg BQL 查询

python - 如何将 Bloomberg API 中的数据存储到 Pandas 数据框中?

c# - Bloomberglp.Blpapi.RequestQueueOverflowException : Queue Size: 128

Python-Twilio 不发送带有测试凭据的短信。

api - 彭博 API 公司行动

excel - 是否可以在 Excel 中获取 Bloomberg 字段名称?

bloomberg - 在 Java v3 Bloomberg API 中启动 bbcomm

python - numba fibonacci 函数较慢并且不会返回相同的结果