[设置Bloomberg Python API时,ImportError _versionhelper

问题描述 投票:0回答:1

我正在尝试使用Bloomberg Python API进行设置。我一直在关注这个tutorial。我能够成功python -m pip install — index-url=https://bloomberg.bintray.com/pip/simple blpapi,但是当我尝试在Python解释器中运行import blpapi时,出现以下错误。如何解决此错误(想知道是否应该使用Python 3.8来解决此问题)?

ImportError:
---------------------------- ENVIRONMENT -----------------------------
Platform: Windows-10-10.0.17763-SP0
Architecture: ('32bit', 'WindowsPE')
Python: 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
Python implementation: CPython

blpapi 64-bit will be loaded from: "C:\blp\API\blpapi_cpp_3.13.1.1\lib\blpapi3_64.dll"
blpapi 32-bit will be loaded from: "C:\blp\API\blpapi_cpp_3.13.1.1\lib\blpapi3_32.dll"
System PATH: (* marks locations where blpapi was found)
    "C:\Windows\system32"
    "C:\Windows"
    "C:\Windows\System32\Wbem"
    "C:\Windows\System32\WindowsPowerShell\v1.0\"
    "C:\Windows\System32\OpenSSH\"
    "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL"
    "C:\Program Files\Intel\Intel(R) Management Engine Components\DAL"
    "c:\nx_dll"
    "C:\Program Files\nodejs\"
  * "C:\blp\API\blpapi_cpp_3.13.1.1\lib"
    "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\"
    "C:\Users\cpage\AppData\Local\Programs\Python\Python38-32\Scripts\"
    "C:\Users\cpage\AppData\Local\Programs\Python\Python38-32\"
    "C:\Users\cpage\AppData\Local\Microsoft\WindowsApps"
  * "C:\blp\DAPI"
    "C:\blp\DAPI\DDE"
    "C:\Users\cpage\AppData\Roaming\npm"
    "C:\Program Files\Sublime Text 3"
    "C:\Users\cpage\AppData\Local\hyper\app-3.0.2\resources\bin"
    "C:\Users\cpage\AppData\Local\Programs\Microsoft VS Code\bin"
  * "C:\blp\API\blpapi_cpp_3.13.1.1\lib"

blpapi package at: "C:\Users\cpage\AppData\Local\Programs\Python\Python38-32\lib\site-packages"

Current directory: "C:\Users\cpage"

----------------------------------------------------------------------
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.
python bloomberg
1个回答
0
投票

您需要下载具有与您的C ++库匹配的版本的python blpapi软件包。

在您的情况下,由于您的C ++库是3.13.1.1,因此您可以下载3.13.1 python软件包:

pip install --index-url=https://bloomberg.bintray.com/pip/simple blpapi==3.13.1

© www.soinside.com 2019 - 2024. All rights reserved.