Plotly removes the need to learn front-web development stacks to create analytical dashboards. Hence, you can focus on analyzing and plotting your data and not solving how to place your plot inside a Div.
This tutorial will teach you how to set up Plotly Dash on your Linux environment.
Installing Python and Pip
Before installing Dash, you need to have Python running on your system. For maximum compatibility, we recommend having Python3 installed.
You can verify the running Python version using the command:
The command above should return the output as shown:
We can confirm that Python3 is installed on your system.
If you do not have Python 3.x installed, you can run the commands as shown to install it.
On Debian and Debian-based distributions:
The command above should install the Python3 interpreter and the pip package manager.
On Arch:
On CentOS and REHL:
On OpenSUSE:
Once you have successfully installed Python3 and Pip, we can proceed to install Dash.
Step 2: Install Plotly Dash
To install Plotly Dash, use pip as follows:
The command above should download and install Dash, plotly, and other required packages.
You can confirm that you have Dash installed by running the command:
>>> dash.__version__
'2.5.1'
The above should return the installed dash version as shown in the output.
Step 3: Installing Dash for Jupyter Notebook
If you are using Jupyter Notebook or Jupyter Lab as your development environment, you need to install the Dash version for Jupyter.
You can use pip as follows:
The command above should install jupyter-dash and all the required components. Depending on the packages to install, this can take a few minutes.
You can verify Dash for Jupyter is installed:
This should return output as shown:
Conclusion
In this tutorial, you learned how to install Plotly Dash on your Linux machine.