From 14a70ed0723d403c838d1215c13b93c0f63698ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 22 Oct 2023 18:45:46 -0300 Subject: [PATCH] Support launching notebook 7 --- src/bin/sage-notebook | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook index 2e8b12e1a1c..801b0a6a6a3 100755 --- a/src/bin/sage-notebook +++ b/src/bin/sage-notebook @@ -29,7 +29,12 @@ class NotebookJupyter(): def __init__(self, argv): self.print_banner() try: - from notebook.notebookapp import main + try: + # notebook 6 + from notebook.notebookapp import main + except ImportError: + # notebook 7 + from notebook.app import main except ImportError: import traceback traceback.print_exc()