Getting Started with Dash on Ubuntu

To run Dash we need to install multiple python modules. They have broken Dash into multiple components.

Step#1 Installation

sudo python3.6 -m pip install dash==0.22.0 # The core dash backend
sudo python3.6 -m pip installl dash-renderer==0.13.0 # The dash front-end
sudo python3.6 -m pip install dash-html-components==0.11.0 # HTML components
sudo python3.6 -m pip install dash-core-components==0.26.0 # Supercharged components
sudo python3.6 -m pip install plotly --upgrade # Plotly graphing library used in examples

Step#2 Hello World in Dash

This is simplest Dash site

# -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html

app = dash.Dash()

app.layout = html.Div(children=[
    html.H1(children='Hello World'),

    html.Div(children='''
        This is simplest "Hello World" by using Dash
    '''),
])

if __name__ == '__main__':
    app.run_server(debug=True)

Step#3 Running Dash site.

$python3.6 filename.py

Thi will run the Dash site and you can access it at http://127.0.0.1:8050/

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.