Allow me to reply myself:
This is caused by old versions of dash related packages.
- First, update both dash-core-components and dash-html-components to the latest version of 2.0.0:
pip install --upgrade dash-html-components
pip install --upgrade dash-core-components
- update the code to call the core and html components:
import dash
# import dash_core_components as dcc #deprecated
from dash import dcc
# import dash_html_components as html #deprecated
from dash import html
from dash.dependencies import Input, Output
I hope the Dash documents can update the contents accordingly.