Loading components

I am trying to reproduce this example:

But I get

File "app_test.py", line 16, in <module>
    dcc.Loading(id="loading-1", children=[html.Div(id="loading-output-1")], type="default"),
AttributeError: module 'dash_core_components' has no attribute 'Loading'

If I do:

 import dash_core_components as dcc

I get:

<module ‘dash_core_components.version’ from ‘/anaconda3/lib/python3.7/site-packages/dash_core_components/version.py’>

You’re likely on an old version of Dash, if you’re doing this for a new project do:

python -m pip install dash --upgrade

If you are doing this for an existing project note there may be some backwards incompatible changes, e.g. events API has been removed in favor of strictly using inputs API, CSS styles now only support camelCase not hyphens, e.g. style={'maxWidth': 10} works but style={'max-width': 10} no longer works.