title: Why is my Dash application not working when running through command prompt?
body: <p>I downloaded simple Dash Plotly example from the internet, which ran correctly on my computer. I have installed Anaconda, Python 3.7, Dash and Plotly on my Windows 10 PC. I ran it using the command prompt at the directory where I have saved this code. I get a local host address, when I paste and run this address in browser, I get all the graphs.</p>
  <p>The same code when I ran through another Windows 10 PC after installing Anaconda, Python 3.7, Dash and Plotly, is not doing anything. When I call the code through command line using <code>python app.py</code>, it does nothing. It simply goes to next line on the command prompt. I am really confused. I am also running it with app.run_server(debug=True), but nothing is happening.</p>
  <p>I cannot post the error message or any other details in second case because I am not getting any which is making it even more difficult to debug.</p>
  <pre><code>import json
  
  import dash
  import dash_core_components as dcc
  import dash_html_components as html
  from dash.dependencies import Input, Output
  import plotly.express as px
  import pandas as pd
  
  external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
  
  app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
  
  styles = {
      'pre': {
          'border': 'thin lightgrey solid',
          'overflowX': 'scroll'
      }
  }
  
  df = pd.DataFrame({
      &quot;x&quot;: [1,2,1,2],
      &quot;y&quot;: [1,2,3,4],
      &quot;customdata&quot;: [1,2,3,4],
      &quot;fruit&quot;: [&quot;apple&quot;, &quot;apple&quot;, &quot;orange&quot;, &quot;orange&quot;]
  })
  
  fig = px.scatter(df, x=&quot;x&quot;, y=&quot;y&quot;, color=&quot;fruit&quot;, custom_data=[&quot;customdata&quot;])
  
  fig.update_layout(clickmode='event+select')
  
  fig.update_traces(marker_size=20)
  
  app.layout = html.Div([
      dcc.Graph(
          id='basic-interactions',
          figure=fig
      ),
  
      html.Div(className='row', children=[
          html.Div([
              dcc.Markdown(&quot;&quot;&quot;
                  **Hover Data**
  
                  Mouse over values in the graph.
              &quot;&quot;&quot;),
              html.Pre(id='hover-data', style=styles['pre'])
          ], className='three columns'),
  
          html.Div([
              dcc.Markdown(&quot;&quot;&quot;
                  **Click Data**
  
                  Click on points in the graph.
              &quot;&quot;&quot;),
              html.Pre(id='click-data', style=styles['pre']),
          ], className='three columns'),
  
          html.Div([
              dcc.Markdown(&quot;&quot;&quot;
                  **Selection Data**
  
                  Choose the lasso or rectangle tool in the graph's menu
                  bar and then select points in the graph.
  
                  Note that if `layout.clickmode = 'event+select'`, selection data also 
                  accumulates (or un-accumulates) selected data if you hold down the shift
                  button while clicking.
              &quot;&quot;&quot;),
              html.Pre(id='selected-data', style=styles['pre']),
          ], className='three columns'),
  
          html.Div([
              dcc.Markdown(&quot;&quot;&quot;
                  **Zoom and Relayout Data**
  
                  Click and drag on the graph to zoom or click on the zoom
                  buttons in the graph's menu bar.
                  Clicking on legend items will also fire
                  this event.
              &quot;&quot;&quot;),
              html.Pre(id='relayout-data', style=styles['pre']),
          ], className='three columns')
      ])
  ])
  
  
  @app.callback(
      Output('hover-data', 'children'),
      [Input('basic-interactions', 'hoverData')])
  def display_hover_data(hoverData):
      return json.dumps(hoverData, indent=2)
  
  
  @app.callback(
      Output('click-data', 'children'),
      [Input('basic-interactions', 'clickData')])
  def display_click_data(clickData):
      return json.dumps(clickData, indent=2)
  
  
  @app.callback(
      Output('selected-data', 'children'),
      [Input('basic-interactions', 'selectedData')])
  def display_selected_data(selectedData):
      return json.dumps(selectedData, indent=2)
  
  
  @app.callback(
      Output('relayout-data', 'children'),
      [Input('basic-interactions', 'relayoutData')])
  def display_relayout_data(relayoutData):
      return json.dumps(relayoutData, indent=2)
  
  
  if __name__ == '__main__':
      app.run_server(debug=True)
  
  </code></pre>