Skip to content

Commit 5115f29

Browse files
committed
Only manually install if no conda
1 parent fe0eee0 commit 5115f29

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/AoC_2024/Dazbo's_Advent_of_Code_2024.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
"source": [
127127
"## Install External Dependencies\n",
128128
"\n",
129+
"Install required OS packages. These cannot be installed with pip. BUT they _can_ be installed with Conda. So we only need to install using a shell command if we're not using Conda.\n",
130+
"\n",
129131
"- [ffmpeg](https://ffmpeg.org/): in order to render video output, i.e. for visualisations.\n",
130132
"- graphviz: for visualising graphs\n",
131133
"\n",
@@ -196,7 +198,9 @@
196198
"if is_connected():\n",
197199
" for app_install, app_exec in apps:\n",
198200
" if not check_installed(app_exec):\n",
199-
" install_software(app_install)"
201+
" if not is_conda_available():\n",
202+
" # No Conda, so install manually\n",
203+
" install_software(app_install)"
200204
]
201205
},
202206
{
@@ -216,7 +220,7 @@
216220
" jupyterlab-lsp ipykernel ipywidgets \\\n",
217221
" matplotlib pandas networkx sympy scipy \\\n",
218222
" colorama python-dotenv tqdm \\\n",
219-
" python-graphviz\n",
223+
" python-graphviz ffmpeg # Conda-only installs\n",
220224
" else:\n",
221225
" print(\"Conda not installed. Installing with pip...\")\n",
222226
" %pip install --upgrade --no-cache-dir \\\n",
@@ -226,7 +230,7 @@
226230
" python-graphviz\n",
227231
" \n",
228232
" print(\"Installing with pip...\")\n",
229-
" %pip install dazbo-commons\n",
233+
" %pip install dazbo-commons # Pip-only installs\n",
230234
"else:\n",
231235
" print(\"Poor connectivity. Run when you're connected.\")"
232236
]

0 commit comments

Comments
 (0)