Are you using an older Python2.7 version?
If so, could you try to run the code with Python>=3.5?
Also note, that Python2 is deprecated now, so you should definitely switch to Python3, if possible (and if you are really using the legacy version).