3

I am running Miniconda 3.7 64-bit. I have successfully installed the blpapi package by running the command > python -m pip install --index-url=https://bloomberg.bintray.com/pip/simple blpapi.

I have also downloaded the c++ sdk from here https://www.bloomberg.com/professional/support/api-library/ and set the BLPAPI_ROOT environment variable toC:\Users\AlexF\Downloads\blpapi_cpp_3.8.18.1.

The package installs correctly but when I try to run import blpapi I get the following error:

Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :: Anaconda, Inc. 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:\Miniconda3\lib\site-packages\blpapi\__init__.py", line 4, in <module>
    from .internals import CorrelationId
  File "C:\Miniconda3\lib\site-packages\blpapi\internals.py", line 844
    def blpapi_EventDispatcher_stop(handle, async):
                                                ^
SyntaxError: invalid syntax

Does anyone know what's wrong here? I've already tried searching for this error and can't find many references on how to fix it.

Alex F
  • 2,086
  • 4
  • 29
  • 67
  • 2
    `async` is now a reserved keyword, the package is not compatible with Python 3.7. – Martijn Pieters Oct 09 '18 at 13:25
  • Thx for info @MartijnPieters, I did not know too, had no time to introduce myself to 3.7 yet :) – Drako Oct 09 '18 at 13:27
  • 1
    This is something that Bloomberg needs to fix. You could try to edit `blpapi\internals.py` and rename that parameter. `async_` should do just fine, but do adjust any further uses in that method. – Martijn Pieters Oct 09 '18 at 13:28

0 Answers0