Skip to content

Commit 808461a

Browse files
dialvarezsryantam626
authored andcommitted
Update Installation
In JupyterLab 3, the enabling command is is sightly different
1 parent a908205 commit 808461a

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

docs/installation.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,42 @@ Prerequisites
1414
Installation Step 1 (Installing the plugin itself)
1515
--------------------------------------------------
1616

17-
Option 1) With Pip
18-
~~~~~~~~~~~~~~~~~~
17+
1.1 Installing the extension
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
20+
With Pip:
1921

2022
.. code-block:: bash
2123
2224
pip install jupyterlab_code_formatter
23-
jupyter serverextension enable --py jupyterlab_code_formatter
2425
25-
Option 2) With Conda
26-
~~~~~~~~~~~~~~~~~~~~
26+
With Conda:
2727

2828
.. code-block:: bash
2929
3030
conda install -c conda-forge jupyterlab_code_formatter
31+
32+
1.2 Enabling the Extension
33+
~~~~~~~~~~~~~~~~~~~~~~~~~~
34+
35+
If you are using JupyterLab >= 3.0.0
36+
37+
.. code-block:: bash
38+
39+
jupyter server extension enable jupyterlab_code_formatter
40+
# if you installed the plugin with pip and using --user, you need to add it here as well
41+
jupyter server extension enable --user jupyterlab_code_formatter
42+
43+
...Or if you are still using JupyterLab < 3.0.0
44+
45+
.. code-block:: bash
46+
3147
jupyter serverextension enable --py jupyterlab_code_formatter
3248
49+
3350
.. important::
3451
You will also need to install a code formatter for this plugin to work. The default formatter for Python are :code:`isort` and :code:`black`, and :code:`formatR` for R. Installing these would be a good place to start.
3552

36-
There is a chance you will observe a warning message when running :code:`jupyter serverextension enable --py jupyterlab_code_formatter`, this should be safe to ignore for now (see this `issue`_).
37-
3853
Also for users that haven't upgraded JupyterLab to version 3.0.0+, you will also need to run :code:`jupyter labextension install @ryantam626/jupyterlab_code_formatter`.
3954

4055
Installation Step 2 (Installing a supported code formatter)

0 commit comments

Comments
 (0)