Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 无法导入blpapi_Python 2.7_Bloomberg_Blpapi - Fatal编程技术网

Python 2.7 无法导入blpapi

Python 2.7 无法导入blpapi,python-2.7,bloomberg,blpapi,Python 2.7,Bloomberg,Blpapi,我几乎花了很多时间试图让彭博API与我的Python2.7安装一起工作,但仍然没有成功。Bloomberg HelpDesk不再支持它,因此他们没有任何帮助。非常感谢您的帮助: C:\Users\user>python Python 2.7.16rc1 (v2.7.16rc1:baacaac06f, Feb 16 2019, 22:56:10) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits"

我几乎花了很多时间试图让彭博API与我的Python2.7安装一起工作,但仍然没有成功。Bloomberg HelpDesk不再支持它,因此他们没有任何帮助。非常感谢您的帮助:

C:\Users\user>python
Python 2.7.16rc1 (v2.7.16rc1:baacaac06f, Feb 16 2019, 22:56:10) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import blpapi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\blpapi\__init__.py", line 11, in <module>
    raise debug_load_error(error)
ImportError:
---------------------------- ENVIRONMENT -----------------------------
Platform: Windows-7-6.1.7601-SP1
Architecture: ('64bit', 'WindowsPE')
Python: 2.7.16rc1 (v2.7.16rc1:baacaac06f, Feb 16 2019, 22:56:10) [MSC v.1500 64 bit (AMD64)]
Python implementation: CPython

blpapi 64-bit will be loaded from: "C:\blp\blpapi_cpp_3.12.3.1\bin\blpapi3_64.dll"
blpapi 32-bit will be loaded from: "C:\blp\blpapi_cpp_3.12.3.1\bin\blpapi3_32.dll"
System PATH: (* marks locations where blpapi was found)
    "C:\Program Files\Java\jdk-12.0.2\bin"
    "C:\Python27\"
    "C:\Python27\Scripts"
    "C:\Windows\system32"
    "C:\Windows"
    "C:\Windows\System32\Wbem"
    "C:\Windows\System32\WindowsPowerShell\v1.0\"
  * "C:\blp\blpapi_cpp_3.12.3.1\bin"

blpapi package at: "C:\Python27\lib\site-packages"

Current directory: "C:\Users\user"

----------------------------------------------------------------------
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.
C:\Users\user>python
win32上的Python 2.7.16rc1(v2.7.16rc1:Baacac06f,2019年2月16日,22:56:10)[MSC v.1500 64位(AMD64)]
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口blpapi
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“C:\Python27\lib\site packages\blpapi\\uuuu init\uuuuu.py”,第11行,在
引发调试\加载\错误(错误)
进口恐怖主义:
----------------------------环境-----------------------------
平台:Windows-7-6.1.7601-SP1
架构:(“64位”、“WindowsPE”)
Python:2.7.16rc1(v2.7.16rc1:Baacac06f,2019年2月16日,22:56:10)[MSC v.1500 64位(AMD64)]
Python实现:CPython
blpapi 64位将从以下位置加载:“C:\blp\blpapi\u cpp\u 3.12.3.1\bin\blpapi3\u 64.dll”
blpapi 32位将从以下位置加载:“C:\blp\blpapi\U cpp\U 3.12.3.1\bin\blpapi 3\U 32.dll”
系统路径:(*标记找到blpapi的位置)
“C:\Program Files\Java\jdk-12.0.2\bin”
“C:\Python27\”
“C:\Python27\Scripts”
“C:\Windows\system32”
“C:\Windows”
“C:\Windows\System32\Wbem”
“C:\Windows\System32\WindowsPowerShell\v1.0\”
*“C:\blp\blpapi\U cpp\U 3.12.3.1\bin”
blpapi包位于:“C:\Python27\lib\site包”
当前目录:“C:\Users\user”
----------------------------------------------------------------------
没有名为_versionhelper的模块
无法打开C++ SDK库。
从以下下载和安装最新的C++ SDK:
http://www.bloomberg.com/professional/api-library
如果已经安装了C++ SDK,请确保到库的路径
在进入解释器之前已添加到路径。

此问题通常与由于环境变量设置不当而无法找到共享库有关。我想看看如何安装这个via。试一试

conda安装-c conda forge blpapi

只要确保您感兴趣的python的任何发行版都打包在
conda
,如前所述。

我做了两件事来解决类似的问题:

1-我安装了Microsoft Visual Studio,确保我具有以下组件:

  • C++/CLI支持
  • VC++2015.3 v14.00(v140)桌面工具集
  • 2-我手动将C++API\lib中的.dll文件(在我的例子中是blpapi3_32.dll和blpapi3_64.dll)复制到C:\windows\system32中,系统使用的所有dll文件都在其中

    此外,我还将C++API\lib中的dll文件复制到C:\blp\DAPI中,用旧文件替换新文件


    不知何故,Path变量未能成功地在API文件夹中找到DLL。

    您的计算机上是否有与
    *\u versionhelper*
    匹配的文件?当你说布隆伯格不再支持这个了,你是说他们现在需要Python 3?在因特网上的一些搜索表明,版本错误是由于Python API和C++安装版本的不匹配造成的。我尝试了一些排列。Bloomberg helpdesk不支持Python API(WAPI产品)。他们有一个新产品,你可以在终端内运行jupyter笔记本电脑。其中一个原因是不鼓励人们在自己的系统上下载彭博社的数据。您使用哪一版本的python blpapi软件包?为什么Bloomberg Helpdesk不能支持您?Bloomberg Helpdesk已经停止支持python