From 2359c7fcc1def1cd7c7f03125aea5d1c94a18f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Guignard?= Date: Sun, 18 Feb 2024 20:12:51 +0100 Subject: [PATCH] Add import fallback for centuri_course module --- 1-Introduction-to-Python/1-Variables.ipynb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/1-Introduction-to-Python/1-Variables.ipynb b/1-Introduction-to-Python/1-Variables.ipynb index 744aadc..8ca32ac 100644 --- a/1-Introduction-to-Python/1-Variables.ipynb +++ b/1-Introduction-to-Python/1-Variables.ipynb @@ -139,7 +139,11 @@ "metadata": {}, "outputs": [], "source": [ - "from centuri_course import answer" + "try:\n", + " from centuri_course import answer\n", + "except ImportError:\n", + " %pip install centuri_course\n", + " from centuri_course import answer" ] }, {