Step 1: Environment Setup
Ensure Python 3.8+ is installed. Create a virtual environment:
python -m venv plotly-env
source plotly-env/bin/activate # On Windows: plotly-env\Scripts\activate
Install Plotly and JupyterLab:
pip install plotly jupyterlab anywidget
Launch JupyterLab:
Create a new notebook and test with:
import plotly.express as px
fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
fig.show()
Visit Getting Started for details.