From d9a7edc6e22b658bb263bf5a47ced070d9dde8e3 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Jan 2021 16:12:44 -0800 Subject: [PATCH 1/7] Jupyter: ipympl hints Add hints from support on how to install ipympl widgets. --- .../jupyter/overview.rst | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index e8784d6c..16d12052 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -107,10 +107,13 @@ the Launcher and type ``conda list``. The libraries in the base environment shou cover most use cases. This base environment is provided to the default "Python 3" notebook, visible in the JupyterLab "Launcher" page. -From the Terminal, you can install additional libraries with a simple ``conda install`` to +From the Jupyter Terminal, you can install additional libraries with a simple ``conda install`` to use in your current session. But these installed libraries won't persist across sessions -if your server is restarted. +if your server is restarted. +Since conda's dependency concretizer has sometimes problems to extend existing environments with new +libraries, you can also use the `mamba `_ package manager. Just +install it with ``conda install -c conda-forge mamba`` and replace ``conda`` with ``mamba`` calls. Creating your own Conda environment and notebook entry @@ -185,6 +188,23 @@ You may follow these general steps to create and install packages within an any - *install packages with conda or pip in the activate environment* + +Example: Creating a Conda environment for Matplotlib Widgets +============================================================ + +We currently install Jupyterlab version 2, which needs additional treatment to get interactive extensions +`such as matplotlib widgets installed `_. + +Here is an example how to install matplotlib: + +:: + conda install -c conda-forge ipympl==0.5.8`` + jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib@0.7.3 + +Once the installation fishes, restart the kernel of your current notebook and refresh the page. +You can now use the `%matplotlib ipympl` magic before importing matplotlib to render interactive plots. + + Manually stopping your JupyterLab session ----------------------------------------- From d3225b0029e6bc4ca08fea27badd1009a733dfbf Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Jan 2021 16:16:24 -0800 Subject: [PATCH 2/7] Fix formatting --- services_and_applications/jupyter/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index 16d12052..5cdf5d7b 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -198,7 +198,7 @@ We currently install Jupyterlab version 2, which needs additional treatment to g Here is an example how to install matplotlib: :: - conda install -c conda-forge ipympl==0.5.8`` + conda install -c conda-forge ipympl==0.5.8 jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib@0.7.3 Once the installation fishes, restart the kernel of your current notebook and refresh the page. From ec6e7c9fa2e08856364dd8a8714bf0e79107bb55 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Jan 2021 16:16:43 -0800 Subject: [PATCH 3/7] Fix newlines --- services_and_applications/jupyter/overview.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index 5cdf5d7b..45cb8533 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -188,7 +188,6 @@ You may follow these general steps to create and install packages within an any - *install packages with conda or pip in the activate environment* - Example: Creating a Conda environment for Matplotlib Widgets ============================================================ From dd50116401e1bfc09d41695b3b8a67f99ec94fc0 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Jan 2021 16:17:49 -0800 Subject: [PATCH 4/7] Links: Annonymous Link Names This avoids collisions in the overall document on references with the same text. --- services_and_applications/jupyter/overview.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index 45cb8533..9e2b7a27 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -112,7 +112,7 @@ use in your current session. But these installed libraries won't persist across if your server is restarted. Since conda's dependency concretizer has sometimes problems to extend existing environments with new -libraries, you can also use the `mamba `_ package manager. Just +libraries, you can also use the `mamba `__ package manager. Just install it with ``conda install -c conda-forge mamba`` and replace ``conda`` with ``mamba`` calls. @@ -192,7 +192,7 @@ Example: Creating a Conda environment for Matplotlib Widgets ============================================================ We currently install Jupyterlab version 2, which needs additional treatment to get interactive extensions -`such as matplotlib widgets installed `_. +`such as matplotlib widgets installed `__. Here is an example how to install matplotlib: From e0566468e501196382a60c7bfb2a8aa8b359b5e9 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Jan 2021 16:19:22 -0800 Subject: [PATCH 5/7] Code Highlighting --- services_and_applications/jupyter/overview.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index 9e2b7a27..91270aaa 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -196,7 +196,8 @@ We currently install Jupyterlab version 2, which needs additional treatment to g Here is an example how to install matplotlib: -:: +.. code-block:: bash + conda install -c conda-forge ipympl==0.5.8 jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib@0.7.3 From df4e5f2cc4f14a11c3ae1036f2492223111b9724 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Jan 2021 16:21:08 -0800 Subject: [PATCH 6/7] Fix Verbatim Code --- services_and_applications/jupyter/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index 91270aaa..8154cfaa 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -202,7 +202,7 @@ Here is an example how to install matplotlib: jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib@0.7.3 Once the installation fishes, restart the kernel of your current notebook and refresh the page. -You can now use the `%matplotlib ipympl` magic before importing matplotlib to render interactive plots. +You can now use the ``%matplotlib ipympl`` magic before importing matplotlib to render interactive plots. Manually stopping your JupyterLab session From 689bb28b16f137dd55da69f71f33c1863c1433a4 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 25 Jan 2021 10:24:18 -0800 Subject: [PATCH 7/7] Remove 2nd example --- services_and_applications/jupyter/overview.rst | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/services_and_applications/jupyter/overview.rst b/services_and_applications/jupyter/overview.rst index 8154cfaa..1519b625 100644 --- a/services_and_applications/jupyter/overview.rst +++ b/services_and_applications/jupyter/overview.rst @@ -188,23 +188,6 @@ You may follow these general steps to create and install packages within an any - *install packages with conda or pip in the activate environment* -Example: Creating a Conda environment for Matplotlib Widgets -============================================================ - -We currently install Jupyterlab version 2, which needs additional treatment to get interactive extensions -`such as matplotlib widgets installed `__. - -Here is an example how to install matplotlib: - -.. code-block:: bash - - conda install -c conda-forge ipympl==0.5.8 - jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib@0.7.3 - -Once the installation fishes, restart the kernel of your current notebook and refresh the page. -You can now use the ``%matplotlib ipympl`` magic before importing matplotlib to render interactive plots. - - Manually stopping your JupyterLab session -----------------------------------------