Skip to content

Clarify Jupyterlab install #4606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions doc/python/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.14.1
jupytext_version: 1.16.1
kernelspec:
display_name: Python 3
display_name: Python 3 (ipykernel)
language: python
name: python3
language_info:
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.8.8
version: 3.10.14
plotly:
description: Getting Started with Plotly for Python.
has_thumbnail: false
Expand Down Expand Up @@ -96,8 +96,7 @@ IFrame(snippet_url + 'getting-started', width='100%', height=1200)

#### JupyterLab Support

For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
packages using `pip`:
To use `plotly` in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets` packages in the same environment as you installed `plotly`, using `pip`:

```
$ pip install "jupyterlab>=3" "ipywidgets>=7.6"
Expand All @@ -109,21 +108,16 @@ or `conda`:
$ conda install "jupyterlab>=3" "ipywidgets>=7.6"
```

You'll need `jupyter-dash` to add widgets such as sliders, dropdowns, and buttons to Plotly charts in JupyterLab.

Install [`jupyter-dash`](https://github.com/plotly/jupyter-dash) using `pip`:

```
$ pip install jupyter-dash
```
The `plotly` jupyterlab extension is included when you install `plotly` using `pip` or `conda`. When you run Jupyter Lab, ensure you are running it in the same environment that you installed `plotly` in so it has access to the `plotly` jupyterlab extension.

or `conda`:
**JupyterLab 2 or earlier** does not support the prebuilt extensions installed using `pip` and `conda`. If you are using JupyterLab 2, run the following command to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):

```
$ conda install -c conda-forge -c plotly jupyter-dash
# JupyterLab 2.x renderer support
jupyter labextension install [email protected] @jupyter-widgets/jupyterlab-manager
```

These packages contain everything you need to run JupyterLab...
Launch JupyterLab with:

```
$ jupyter lab
Expand All @@ -148,18 +142,10 @@ fig_widget = go.FigureWidget(fig)
fig_widget
```

The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):

```
# JupyterLab 2.x renderer support
jupyter labextension install [email protected] @jupyter-widgets/jupyterlab-manager
```

Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple python environments inside Jupyter.


See [_Displaying Figures in Python_](/python/renderers/) for more information on the renderers framework, and see [_Plotly FigureWidget Overview_](/python/figurewidget/) for more information on using `FigureWidget`.

See the [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple Python environments inside Jupyter.



#### Jupyter Notebook Support
Expand Down