Python 3d Annotation Example Not Working

I am trying to annotate a 3d surface plot using plotly for python. However, the example provided here does not work for me. When I try to run it I get an error informing me that:

‘annotations’ is not allowed in ‘scene’

And that:

Valid attributes for ‘scene’ at path [‘scene’] under parents [‘layout’]:

['aspectmode', 'aspectratio', 'bgcolor', 'camera', 'cameraposition',
'domain', 'dragmode', 'hovermode', 'xaxis', 'yaxis', 'zaxis']

Has the method for annotating 3d plots changed?

Hey @stuart, it appears that you are running an old Plotly vesion. Install the latest one with:
pip install plotly --upgrade
and the 3d annotation example will work fine.