Skip to content

Commit 783b4cf

Browse files
committed
Simplify install instructions.
1 parent aafffd2 commit 783b4cf

File tree

1 file changed

+39
-31
lines changed

1 file changed

+39
-31
lines changed

docs/source/user_install.md

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Users can install the current version of **ipywidgets** with
55
[pip](https://pip.pypa.io/en/stable/) or
66
[conda](https://conda.readthedocs.io/en/latest/).
77

8-
In most cases, installing the Python `ipywidgets` package will also automatically configure classic Jupyter Notebook and JupyterLab 3.0 to display ipywidgets. With pip, do:
8+
In most cases, installing the Python `ipywidgets` package will also automatically configure classic Jupyter Notebook and JupyterLab 3.x to display ipywidgets. With pip, do:
99

1010
``` bash
1111
pip install ipywidgets
@@ -17,61 +17,52 @@ or with conda, do:
1717
conda install -c conda-forge ipywidgets
1818
```
1919

20-
Installing in classic Jupyter Notebook
21-
--------------------------------------
22-
23-
Most of the time, installing `ipywidgets` automatically configures Jupyter Notebook to use widgets. The `ipywidgets` package does this by depending on the `widgetsnbextension` package, which configures the classic Jupyter Notebook to display and use widgets. If you have an old version of Jupyter Notebook installed, you may need to manually enable the ipywidgets notebook extension with:
24-
25-
```bash
26-
jupyter nbextension enable --py widgetsnbextension
27-
```
28-
29-
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
30-
an activated virtual environment, the ``--sys-prefix`` option may be required
31-
to enable the extension and keep the environment isolated (i.e.
32-
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
20+
Installing in JupyterLab 3.x
21+
----------------------------
3322

23+
Most of the time, installing `ipywidgets` automatically configures JupyterLab 3.x to use widgets. The `ipywidgets` package does this by depending on the `jupyterlab_widgets` package, which configures JupyterLab 3 to display and use widgets.
3424

35-
If your Jupyter Notebook and the IPython kernel are installed in different
25+
If JupyterLab and the IPython kernel are installed in different
3626
environments (for example, separate environments are providing different
3727
Python kernels), then the installation requires two steps:
3828

39-
1. Install the `widgetsnbextension` package in the environment
40-
containing the Jupyter Notebook server.
29+
1. Install the `jupyterlab_widgets` package in the environment containing JupyterLab.
4130
2. Install `ipywidgets` in each kernel's environment that will use ipywidgets.
4231

43-
For example, if using conda environments, with Jupyter Notebook installed on the
44-
`base` environment and the kernel installed in an environment called `py36`,
32+
For example, if using conda environments, with JupyterLab installed on the
33+
`base` environment and the kernel installed in an environment called `pyenv`,
4534
the commands are:
4635

4736
```bash
48-
conda install -n base -c conda-forge widgetsnbextension
49-
conda install -n py36 -c conda-forge ipywidgets
37+
conda install -n base -c conda-forge jupyterlab_widgets
38+
conda install -n pyenv -c conda-forge ipywidgets
5039
```
5140

52-
Installing in JupyterLab 3.0
53-
----------------------------
5441

55-
Most of the time, installing `ipywidgets` automatically configures JupyterLab 3.0 to use widgets. The `ipywidgets` package does this by depending on the `jupyterlab_widgets` package, version 1.0, which configures JupyterLab 3 to display and use widgets.
42+
Installing in classic Jupyter Notebook
43+
--------------------------------------
44+
45+
Most of the time, installing `ipywidgets` automatically configures Jupyter Notebook to use widgets. The `ipywidgets` package does this by depending on the `widgetsnbextension` package, which configures the classic Jupyter Notebook to display and use widgets.
5646

57-
If your JupyterLab and the IPython kernel are installed in different
47+
If your Jupyter Notebook and the IPython kernel are installed in different
5848
environments (for example, separate environments are providing different
5949
Python kernels), then the installation requires two steps:
6050

61-
1. Install the `jupyterlab_widgets` package (version 1.0 or later) in the environment
62-
containing JupyterLab.
51+
1. Install the `widgetsnbextension` package in the environment
52+
containing the Jupyter Notebook server.
6353
2. Install `ipywidgets` in each kernel's environment that will use ipywidgets.
6454

65-
For example, if using conda environments, with JupyterLab installed on the
66-
`base` environment and the kernel installed in an environment called `py36`,
55+
For example, if using conda environments, with Jupyter Notebook installed on the
56+
`base` environment and the kernel installed in an environment called `pyenv`,
6757
the commands are:
6858

6959
```bash
70-
conda install -n base -c conda-forge jupyterlab_widgets
71-
conda install -n py36 -c conda-forge ipywidgets
60+
conda install -n base -c conda-forge widgetsnbextension
61+
conda install -n pyenv -c conda-forge ipywidgets
7262
```
7363

7464

65+
7566
Installing into JupyterLab 1 or 2
7667
---------------------------------
7768

@@ -103,6 +94,23 @@ running the `jupyter lab clean` command which will remove the staging and
10394
static directories from the lab directory. The location of the lab directory
10495
can be queried by executing the command `jupyter lab path` in your terminal.
10596

97+
Installing into classic Jupyter Notebook 5.2 or earlier
98+
-------------------------------------------------------
99+
100+
If you have an old version of Jupyter Notebook installed (version 5.2 or
101+
earlier), you may need to manually enable the ipywidgets notebook extension
102+
with:
103+
104+
```bash
105+
jupyter nbextension enable --py widgetsnbextension
106+
```
107+
108+
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
109+
an activated virtual environment, the ``--sys-prefix`` option may be required
110+
to enable the extension and keep the environment isolated (i.e.
111+
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
112+
113+
106114
Frequently Asked Questions
107115
--------------------------
108116

0 commit comments

Comments
 (0)