I attempted to use the query "from xbbg import blp," but encountered the following error message: -> AttributeError: module 'blpapi' has no attribute 'session' (refer to the image below).
In my attempts to resolve this issue, I undertook the following steps:
- I tried installing the "blpapi" Python library in my Anaconda environment using the commands
pip install blpapiandconda -c conda-forge blpapi. However, this approach failed due to a network blockage preventing the download of external sites. - I installed "blpapipd" and "blpapi-stubs," both of which offer some similar functions. Unfortunately, even with these installations, the 'blp' import still did not function.
- I downloaded the blpapi package directly from the official Bloomberg site and placed the folder in
/anaconda3/site-packages/folderX. Regrettably, this did not resolve the problem.
If anyone has a small idea about how to resolve this issue, I open to suggestions.
Thanks.
You can see the image, it shows the error. enter image description here
You can't pip install blpapi.
pip uninstall blpapi
Then run install via pip using
python -m pip install --index-url=https://bcms.bloomberg.com/pip/simple blpapi
That's the proper way to install blpapi. You can then use xbbg as expected.