这是我的第一篇文章。我运行以下命令: Win 10 Anaconda with Python 3.6.5 Bloomberg Anywhere
我正在尝试将blpapi
(bloomberg 专业 API)用于 Python。下载了桌面 API 包(带有 C++ 库),下载blpapi-3.9.1-cp36-cp36m-win_amd64.whl
了安装程序文件并成功运行。最后C:\..\C++API\v3.11.6.1\bin
,我在用户和环境变量中添加了我的路径(来自stackoverflow上的早期查询):
Python 2.7 with Bloomberg API import blpapi failure
运行时我的错误消息import blpapi
:
>---------------------------------------------------------------------------
>ImportError Traceback (most recent call last)
>~\Anaconda3\lib\site-packages\blpapi\internals.py in swig_import_helper()
> 38 try:
>---> 39 return importlib.import_module(mname)
> 40 except ImportError:
>
>~\Anaconda3\lib\importlib\__init__.py in import_module(name, package)
> 125 level += 1
>--> 126 return _bootstrap._gcd_import(name[level:], package, level)
> 127 >>
>
>~\Anaconda3\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)
>
>~\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
>
>~\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, >import_)
>
>~\Anaconda3\lib\importlib\_bootstrap.py in _load_unlocked(spec)
>
>~\Anaconda3\lib\importlib\_bootstrap.py in module_from_spec(spec)
>
>~\Anaconda3\lib\importlib\_bootstrap_external.py in create_module(self, spec)
>
>~\Anaconda3\lib\importlib\_bootstrap.py in _call_with_frames_removed(f, *args, >**kwds)
>
>ImportError: DLL load failed: The specified module could not be found.
>
>During handling of the above exception, another exception occurred:
>
>ModuleNotFoundError Traceback (most recent call last)
>~\Anaconda3\lib\site-packages\blpapi\__init__.py in <module>()
> 3 try:
>----> 4 from .internals import CorrelationId
> 5 except ImportError as error:
>
>~\Anaconda3\lib\site-packages\blpapi\internals.py in <module>()
> 41 return importlib.import_module('_internals')
>---> 42 _internals = swig_import_helper()
> 43 del swig_import_helper
>
>~\Anaconda3\lib\site-packages\blpapi\internals.py in swig_import_helper()
> 40 except ImportError:
>---> 41 return importlib.import_module('_internals')
> 42 _internals = swig_import_helper()
>
>~\Anaconda3\lib\importlib\__init__.py in import_module(name, package)
> 125 level += 1
>--> 126 return _bootstrap._gcd_import(name[level:], package, level)
> 127
>
>ModuleNotFoundError: No module named '_internals'
>
>During handling of the above exception, another exception occurred:
>
>ImportError Traceback (most recent call last)
><ipython-input-1-ee203a799ece> in <module>()
>----> 1 import blpapi
>
>~\Anaconda3\lib\site-packages\blpapi\__init__.py in <module>()
> 27
> 28 """ % (str(error), env)
>---> 29 raise ImportError(msg)
> 30
> 31 from .abstractsession import AbstractSession
>
>ImportError: No module named '_internals'
>
>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.
有人知道问题可能是什么吗?