From d51bba8fe9885a855ecc5a007c6f5010763f57e3 Mon Sep 17 00:00:00 2001 From: Maddy <12754347+MaddyDev@users.noreply.github.com> Date: Wed, 1 Jul 2020 15:27:45 -0700 Subject: [PATCH] check for jupyter-book versions and install 6.4 (#11167) * check for jupyter-book versions and install 6.4 * added a note before installation --- .../resources/notebooks/JupyterBooksCreate.ipynb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extensions/notebook/resources/notebooks/JupyterBooksCreate.ipynb b/extensions/notebook/resources/notebooks/JupyterBooksCreate.ipynb index 77e96c7627..db012cd5b6 100644 --- a/extensions/notebook/resources/notebooks/JupyterBooksCreate.ipynb +++ b/extensions/notebook/resources/notebooks/JupyterBooksCreate.ipynb @@ -25,6 +25,7 @@ "source": [ "# Create Jupyter Book\n", "\n", + "Note: Jupyter Books in Azure Data Studio only support jupyter-book versions <= 0.6.4 To create a Jupyter Book, we will be uninstalling versions newer than 0.6.4 and replacing with 0.6.4\n", "## 1. Installation\n", "\n", "To install the Jupyter Book command-line interface (CLI), use `pip`!" @@ -38,13 +39,18 @@ "source": [ "import sys\r\n", "\r\n", - "#install jupyter-book\r\n", + "#install jupyter-book 0.6.4\r\n", "cmd = f'{sys.executable} -m pip show jupyter-book'\r\n", "cmdOutput = !{cmd}\r\n", "if len(cmdOutput) > 1 and '0.6.4' in cmdOutput[1]:\r\n", " print('Jupyter-book required version is already installed!')\r\n", + "elif len(cmdOutput) > 1:\r\n", + " print('Unsupported version of Jupyter-book installed, Please wait while we uninstall and install the supported version.')\r\n", + " !pip uninstall jupyter-book --yes\r\n", + " !pip install jupyter-book==0.6.4\r\n", "else:\r\n", - " !pip install jupyter-book" + " print('Installing Jupyter-book...')\r\n", + " !pip install jupyter-book==0.6.4" ], "metadata": { "azdata_cell_guid": "8bd77173-2f63-4bf8-95e8-af2a654fc91e",