From b0f55b4b9b2a2b8200cc3ffb9f40865e0cf47ab7 Mon Sep 17 00:00:00 2001 From: Sanjiv Das Date: Tue, 21 Jan 2025 08:43:04 -0800 Subject: [PATCH 1/3] Updated documentation for pip install in zsh Fixes #1209 Updated documentation to handle installation using `zsh` on Macs, which is now the default shell. --- docs/source/users/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/users/index.md b/docs/source/users/index.md index 51ed69249..2a2315b66 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -119,6 +119,11 @@ If you are not using JupyterLab and you only want to install the Jupyter AI `jupyter-ai` depends on `jupyter-ai-magics`, so installing `jupyter-ai` automatically installs `jupyter-ai-magics`. +*Note*: This installation step fails in a `zsh` environment because `zsh` uses square brackets for pattern matching. `zsh` is the default shell for Mac users since Catalina https://support.apple.com/en-ca/102360. The square brackets need to be escaped or the entire package name quoted. Please use the following install command instead: + + $ pip install 'jupyter-ai[all]' + + ### Minimal installation via `pip` Most model providers in Jupyter AI require a specific dependency to be installed From e19b1c3c11a79e990dfd100f658e0fa2b8768a63 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:51:50 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/source/users/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/users/index.md b/docs/source/users/index.md index 2a2315b66..b6ab959ff 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -121,7 +121,7 @@ automatically installs `jupyter-ai-magics`. *Note*: This installation step fails in a `zsh` environment because `zsh` uses square brackets for pattern matching. `zsh` is the default shell for Mac users since Catalina https://support.apple.com/en-ca/102360. The square brackets need to be escaped or the entire package name quoted. Please use the following install command instead: - $ pip install 'jupyter-ai[all]' + $ pip install 'jupyter-ai[all]' ### Minimal installation via `pip` From de462d9b8af213277a1842f424cd833076c87ffc Mon Sep 17 00:00:00 2001 From: Sanjiv Das Date: Tue, 21 Jan 2025 10:43:47 -0800 Subject: [PATCH 3/3] Update index.md --- docs/source/users/index.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/users/index.md b/docs/source/users/index.md index b6ab959ff..a31125e2b 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -106,7 +106,7 @@ section to pick the installation method that works best for you. If you want to install both the `%%ai` magic and the JupyterLab extension, you can run: - $ pip install jupyter-ai[all] + $ pip install 'jupyter-ai[all]' Then, restart JupyterLab. This will install every optional dependency, which provides access to all models currently supported by `jupyter-ai`. @@ -114,14 +114,15 @@ provides access to all models currently supported by `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[all] + $ pip install 'jupyter-ai-magics[all]' `jupyter-ai` depends on `jupyter-ai-magics`, so installing `jupyter-ai` automatically installs `jupyter-ai-magics`. -*Note*: This installation step fails in a `zsh` environment because `zsh` uses square brackets for pattern matching. `zsh` is the default shell for Mac users since Catalina https://support.apple.com/en-ca/102360. The square brackets need to be escaped or the entire package name quoted. Please use the following install command instead: - - $ pip install 'jupyter-ai[all]' +:::{warning} +:name: quoting-cli-arguments +If running the above commands result in an error like `zsh: no matches found: jupyter-ai[all]`, this is because the `jupyter-ai[all]` argument must be surrounded by single or double quotes. Some shells reserve square brackets for pattern matching, so arguments containing square brackets must be quoted. +::: ### Minimal installation via `pip`