Hi,
I am trying to run one of Dash basic examples. This is the code:
import dash
import dash_html_components as html
import dash_core_components as dcc
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div([
html.Div(dcc.Input(id='input-box', type='text')),
html.Button('Submit', id='button'),
html.Div(id='output-container-button',
children='Enter a value and press submit')
])
@app.callback(
dash.dependencies.Output('output-container-button', 'children'),
[dash.dependencies.Input('button', 'n_clicks')],
[dash.dependencies.State('input-box', 'value')])
def update_output(n_clicks, value):
return 'The input value was "{}" and the button has been clicked {} times'.format(
value,
n_clicks
)
if __name__ == '__main__':
app.run_server(debug=True)
but when I want to connect to dash, I get the âError loading dependenciesâ error.
even when using the same code as the sample reference page. Hereâs the code (and link) I copied/pasted to test if it works in jupyter. Am I missing something?
Thanks in advance!
page link: must add https dash.plot.ly/dash-core-components/dropdown
import dash
import dash_html_components as html
import dash_core_components as dcc