I have been trying to get either pdblp or pybbg to work in python. I have installed blpapi
via pip
, and download the experimental c++ version and added it to my PATH environmental variables. When running the following code I get this error for pdblp
Using Anaconda3 64 bit, python 3.7, the latest blp_cpp experemental verision (cpp_3.12.3.1), and pip install was verision 3.12.2. Computer is using windows 10:
import blpapi
import pdblp
Traceback (most recent call last):
File "<ipython-input-2-af8ae6f76dae>", line 1, in <module>
import pdblp
File "C:\ProgramData\Anaconda3\lib\site-packages\pdblp\__init__.py", line 1, in <module>
from .pdblp import BCon # NOQA
File "C:\ProgramData\Anaconda3\lib\site-packages\pdblp\pdblp.py", line 9, in <module>
_RESPONSE_TYPES = [blpapi.Event.RESPONSE, blpapi.Event.PARTIAL_RESPONSE]
AttributeError: module 'blpapi' has no attribute 'Event'
and this error for pybbg:
import pandas as pd
import numpy as np
import blpapi
import pybbg as pybbg
bb = pybbg.Pybbg()
runfile('C:/Python/BB.py', wdir='C:/Python')
Reloaded modules: pybbg, pybbg.pybbg_k
Traceback (most recent call last):
File "<ipython-input-4-b339dc11b877>", line 1, in <module>
runfile('C:/Python/BB.py', wdir='C:/Python')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:\Python\BB.py", line 14, in <module>
bb = pybbg.Pybbg()
File "C:\Python\PYTHONPATH\pybbg\pybbg_k.py", line 27, in __init__
sessionOptions = blpapi.SessionOptions()
AttributeError: module 'blpapi' has no attribute 'SessionOptions'
Any help on this would be much appreciated.