From cca90bcc7f0cf15348eb2f898f19a0cdd2565864 Mon Sep 17 00:00:00 2001 From: maximlt Date: Mon, 4 Dec 2023 14:27:25 +0100 Subject: [PATCH 1/2] make it clear pyviz_comms need to be installed next to Jupyter --- doc/getting_started/installation.md | 4 ++++ doc/how_to/notebook/notebook.md | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/doc/getting_started/installation.md b/doc/getting_started/installation.md index f2bf082bda..c07d738e59 100644 --- a/doc/getting_started/installation.md +++ b/doc/getting_started/installation.md @@ -45,6 +45,10 @@ pip install panel :::: +:::{important} +Is Panel installed together with JupyterLab/Jupyter Notebook in your working environment? If not, you need to make sure that `pyviz_comms` is explicitly installed next to JupyterLab/Jupyter Notebook (`conda install pyviz_comms` or `pip install pyviz-comms`) for bi-directional communication to be fully working. +::: + :::{seealso} If you intend to work with Panel in a non-Jupyter notebook environment such as VSCode have a quick at the [relevant how-to section](../how_to/notebook/other_nb.md). ::: diff --git a/doc/how_to/notebook/notebook.md b/doc/how_to/notebook/notebook.md index e31b046c9f..f546de777a 100644 --- a/doc/how_to/notebook/notebook.md +++ b/doc/how_to/notebook/notebook.md @@ -6,6 +6,15 @@ This guide addresses how to display output in Jupyter and non-Jupyter based note Once you have installed Panel it should automatically set up class Jupyter notebook and JupyterLab extensions for rendering Panel output and configuring communication channels to ensure the rendered output syncs bi-directionally with the Python process. +## Run Panel in another notebook kernel + +You generally have two ways to install JupyterLab/Jupyter Notebook: + +1. directly in your working environment that contains all the dependencies you need to run your project +2. in another environment, maybe a central environment or an environment dedicated to Jupyter, in which case when you run a notebook you should pick the kernel of your project environment + +When in the second setup, you need to ensure that `pyviz_comms` is explicitly installed next to JupyterLab/Jupyter Notebook (with `conda install pyviz_comms` or `pip install pyviz-comms`) for bi-directional communication to be fully working. + ## Loading the extension The first step when working in a notebook environment should always be to load the `panel.extension`: From 7c0fc111eb21e3593c6239db6b60e2965438fe98 Mon Sep 17 00:00:00 2001 From: maximlt Date: Tue, 5 Dec 2023 08:43:45 +0100 Subject: [PATCH 2/2] clearer env install instructions --- doc/getting_started/installation.md | 2 +- doc/how_to/notebook/notebook.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/getting_started/installation.md b/doc/getting_started/installation.md index c07d738e59..5af34fbbe8 100644 --- a/doc/getting_started/installation.md +++ b/doc/getting_started/installation.md @@ -46,7 +46,7 @@ pip install panel :::: :::{important} -Is Panel installed together with JupyterLab/Jupyter Notebook in your working environment? If not, you need to make sure that `pyviz_comms` is explicitly installed next to JupyterLab/Jupyter Notebook (`conda install pyviz_comms` or `pip install pyviz-comms`) for bi-directional communication to be fully working. +Is Panel installed together with JupyterLab/Jupyter Notebook in your working environment? If not, you need to make sure that `pyviz_comms` is explicitly installed in the same environment as JupyterLab/Jupyter Notebook (`conda install pyviz_comms` or `pip install pyviz-comms`) for bi-directional communication to be fully working. ::: :::{seealso} diff --git a/doc/how_to/notebook/notebook.md b/doc/how_to/notebook/notebook.md index f546de777a..71f2721aa5 100644 --- a/doc/how_to/notebook/notebook.md +++ b/doc/how_to/notebook/notebook.md @@ -13,7 +13,7 @@ You generally have two ways to install JupyterLab/Jupyter Notebook: 1. directly in your working environment that contains all the dependencies you need to run your project 2. in another environment, maybe a central environment or an environment dedicated to Jupyter, in which case when you run a notebook you should pick the kernel of your project environment -When in the second setup, you need to ensure that `pyviz_comms` is explicitly installed next to JupyterLab/Jupyter Notebook (with `conda install pyviz_comms` or `pip install pyviz-comms`) for bi-directional communication to be fully working. +When in the second setup, you need to ensure that `pyviz_comms` is explicitly installed in the same environment as JupyterLab/Jupyter Notebook (with `conda install pyviz_comms` or `pip install pyviz-comms`) for bi-directional communication to be fully working. ## Loading the extension