From 0c21920c5f52e382b9e07a9b907c808e8a5f3d4e Mon Sep 17 00:00:00 2001 From: Jason Weill Date: Thu, 1 Feb 2024 16:39:11 -0800 Subject: [PATCH] Updates to favor hyphens in pip commands --- README.md | 7 ++++--- docs/source/users/index.md | 26 ++++++++++---------------- 2 files changed, 14 insertions(+), 19 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 9016444c6..48bd80f4c 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -62,24 +62,24 @@ 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` or `conda` in a Conda environment (recommended) @@ -97,13 +97,10 @@ and create an environment that uses Python 3.11: Then, use either `pip` or `conda` to install JupyterLab and Jupyter AI in this Conda environment. - $ pip install jupyter_ai # or, + $ pip install jupyter-ai # or, $ conda install -c conda-forge jupyter-ai # or, $ conda install conda-forge::jupyter-ai -Note that the `pip` package name is `jupyter_ai` with an underscore, and that -the `conda` package name is `jupyter-ai` with a hyphen. - When starting JupyterLab with Jupyter AI, make sure to activate the Conda environment first: @@ -116,11 +113,11 @@ jupyter lab If you installed Jupyter AI using `pip`, to remove the extension, run: - $ pip uninstall jupyter_ai + $ pip uninstall jupyter-ai or - $ pip uninstall jupyter_ai_magics + $ pip uninstall jupyter-ai-magics If you installed Jupyter AI using `conda`, you can remove it by running: @@ -130,9 +127,6 @@ or $ conda remove jupyter-ai-magics -Note that the `pip` package names use underscores, and the `conda` package -names use hyphens. - ## Model providers Jupyter AI supports a wide range of model providers and models. To use Jupyter AI with a particular provider, you must install its Python packages and set its API key (or other credentials) in your environment or in the chat interface.