Plotly is not working in Jupyterlab. I assume that there is a conflict in required extensions but I'm not sure. On checking troubleshooting on Plotly https://plotly.com/python/troubleshooting/ , they advise to remove extensions and install them again. But I found that there is additional extension that came with Jupyterlab update called 'jupyterlab-plotly-extension' which is not mentioned by Plotly in their instructions to make it working in JupyterLab https://plotly.com/python/getting-started/#jupyterlab-support-python-35
My question is: which extensions should be installed to make Plotly working in JupyterLab?
You can install plotly using pip or conda:
pip install "plotly>=5" "ipywidgets>=7.6"
# or if using conda
# conda install -c plotly "plotly>=5"
# conda install "ipywidgets>=7.6"
Plotly comes with support for both the Jupyter Notebook and JupyterLab. There is no need to install anything else for JupyterLab 3.0 and newer. The widget package and the renderer package are both included in plotly
starting from v5.
For older versions of JupyterLab (1.x and 2.x) you will need a recent Node.js installed and install additional packages; do not run these commands if using newer version of JupyterLab:
pip install "ipywidgets>=7.5"
# renderer support
jupyter labextension install jupyterlab-plotly
# OPTIONAL: Jupyter widgets extension
jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget
Enter 'jupyter labextension list' in a terminal or command to run the environment status. The example below shows my environment information with 'jupyter lab' running successfully.
xxxxx-no-iMac:~ xxxxx$ jupyter labextension list
JupyterLab v2.1.5
Known labextensions:
app dir: /Library/Frameworks/Python.framework/Versions/3.6/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
@jupyterlab/git v0.20.0 enabled OK
@lckr/jupyterlab_variableinspector v0.5.0 enabled OK
jupyterlab-plotly v1.5.4 enabled OK
nbdime-jupyterlab v2.0.0 enabled OK
plotlywidget v1.5.4 enabled OK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With