From bbc08cdd378462900efe2f0b060d34af4d26efc1 Mon Sep 17 00:00:00 2001 From: Jason Weill <93281816+JasonWeill@users.noreply.github.com> Date: Mon, 5 Feb 2024 07:55:13 -0800 Subject: [PATCH] Mentions conda install instructions in docs (#611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Mentions conda install instructions in docs * Uninstallation with conda * Updates to favor hyphens in pip commands * Update docs/source/users/index.md Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com> --------- Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com> --- README.md | 7 ++++--- docs/source/users/index.md | 37 +++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 91550016e..f390aa280 100644 --- a/README.md +++ b/README.md @@ -54,19 +54,20 @@ for details on installing and using Jupyter AI. If you want to install both the `%%ai` magic and the JupyterLab extension, you can run: - $ pip install jupyter_ai + $ pip install jupyter-ai If you are not using JupyterLab and you only want to install the Jupyter AI `%%ai` magic, you can run: - $ pip install jupyter_ai_magics + $ pip install jupyter-ai-magics ### With conda As an alternative to using `pip`, you can install `jupyter-ai` using [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) -from the `conda-forge` channel: +from the `conda-forge` channel, using one of the following two commands: + $ conda install -c conda-force jupyter-ai # or, $ conda install conda-forge::jupyter-ai ## The `%%ai` magic command diff --git a/docs/source/users/index.md b/docs/source/users/index.md index 5a9ca7898..36087629f 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -62,26 +62,26 @@ classes in their code. To install the JupyterLab extension, you can run: ``` -pip install jupyter_ai +pip install jupyter-ai ``` -The latest major version of `jupyter_ai`, v2, only supports JupyterLab 4. If you -need support for JupyterLab 3, you should install `jupyter_ai` v1 instead: +The latest major version of `jupyter-ai`, v2, only supports JupyterLab 4. If you +need support for JupyterLab 3, you should install `jupyter-ai` v1 instead: ``` -pip install jupyter_ai~=1.0 +pip install jupyter-ai~=1.0 ``` If you are not using JupyterLab and you only want to install the Jupyter AI `%%ai` magic, you can run: ``` -$ pip install jupyter_ai_magics +$ pip install jupyter-ai-magics ``` -`jupyter_ai` depends on `jupyter_ai_magics`, so installing `jupyter_ai` -automatically installs `jupyter_ai_magics`. +`jupyter-ai` depends on `jupyter-ai-magics`, so installing `jupyter-ai` +automatically installs `jupyter-ai-magics`. -### Installation via `pip` within Conda environment (recommended) +### Installation via `pip` or `conda` in a Conda environment (recommended) We highly recommend installing both JupyterLab and Jupyter AI within an isolated Conda environment to avoid clobbering Python packages in your existing Python @@ -93,10 +93,11 @@ and create an environment that uses Python 3.11: $ conda create -n jupyter-ai python=3.11 $ conda activate jupyter-ai - $ pip install jupyter_ai -Then, follow the steps from "Requirements" and "Installation via `pip`" to -install JupyterLab and Jupyter AI in this Conda environment. +Then, use `conda` to install JupyterLab and Jupyter AI in this Conda environment. + + $ conda install -c conda-forge jupyter-ai # or, + $ conda install conda-forge::jupyter-ai When starting JupyterLab with Jupyter AI, make sure to activate the Conda environment first: @@ -108,13 +109,21 @@ jupyter lab ## Uninstallation -To remove the extension, run: +If you installed Jupyter AI using `pip`, to remove the extension, run: + + $ pip uninstall jupyter-ai + +or + + $ pip uninstall jupyter-ai-magics + +If you installed Jupyter AI using `conda`, you can remove it by running: - $ pip uninstall jupyter_ai + $ conda remove jupyter-ai or - $ pip uninstall jupyter_ai_magics + $ conda remove jupyter-ai-magics ## Model providers