diff --git a/src/AoC_2024/Dazbo's_Advent_of_Code_2024.ipynb b/src/AoC_2024/Dazbo's_Advent_of_Code_2024.ipynb index b87c3ce..81d1c04 100644 --- a/src/AoC_2024/Dazbo's_Advent_of_Code_2024.ipynb +++ b/src/AoC_2024/Dazbo's_Advent_of_Code_2024.ipynb @@ -75,7 +75,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -116,12 +116,16 @@ "You don't have to use Conda! But it has some advantages. If you want to use Conda to manage packages and don't have it installed, you can [Install Miniconda](https://docs.anaconda.com/miniconda/install/#quick-command-line-install), and then:\n", "\n", "```bash\n", + "conda env list # see environments and current active env\n", + "\n", + "export AOC_ENV=\"aoc-conda-env\"\n", + "\n", "# Create and activate a conda environment\n", - "conda create --name aoc-conda-env\n", - "conda activate aoc-conda-env\n", + "conda create --name $AOC_ENV\n", + "conda activate $AOC_ENV\n", "\n", "# Install some base packages\n", - "conda install python jupyter jupyterlab ipykernel ipython ipywidgets pexpect pygments\n", + "conda install -y -c conda-forge python jupyter jupyterlab\n", "```\n", "\n", "Now reload this notebook and set its kernel to the `aoc-conda-env` you just created. And you're good to go!" @@ -10524,7 +10528,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.13.1" }, "toc-autonumbering": false, "toc-showcode": false, diff --git a/src/readme.md b/src/readme.md index 1a6640a..a9115d8 100644 --- a/src/readme.md +++ b/src/readme.md @@ -1,3 +1,27 @@ # Welcome to the source for my Advent of Code Solutions If you'd like to peruse this code along with my solution walkthroughs, then take a look [here](https://derailed-dash.github.io/Advent-of-Code/). + +## Setting Up Your Environment + +With Conda: + +```bash +conda env list # see environments and current active env + +export AOC_ENV="aoc-conda-env" + +# Create and activate an environment +conda create --name $AOC_ENV +conda activate $AOC_ENV + +# Install some core packages +# Before trying to run any Python code or Jupyter cells in this env +conda install -y -c conda-forge python jupyter jupyterlab + +# Additional packages - or we could install these from (say) a Jupyter notebook +conda install pandas hvplot mathjax matplotlib networkx numpy plotly scipy + +# Export the current environment config - for source control +conda env export > $AOC_ENV.yml +``` diff --git a/src/template_folder/Dazbo's_Advent_of_Code_Template.ipynb b/src/template_folder/Dazbo's_Advent_of_Code_Template.ipynb index 3901957..5a7628a 100644 --- a/src/template_folder/Dazbo's_Advent_of_Code_Template.ipynb +++ b/src/template_folder/Dazbo's_Advent_of_Code_Template.ipynb @@ -116,12 +116,16 @@ "You don't have to use Conda! But it has some advantages. If you want to use Conda to manage packages and don't have it installed, you can [Install Miniconda](https://docs.anaconda.com/miniconda/install/#quick-command-line-install), and then:\n", "\n", "```bash\n", + "conda env list # see environments and current active env\n", + "\n", + "export AOC_ENV=\"aoc-conda-env\"\n", + "\n", "# Create and activate a conda environment\n", - "conda create --name aoc-conda-env\n", - "conda activate aoc-conda-env\n", + "conda create --name $AOC_ENV\n", + "conda activate $AOC_ENV\n", "\n", "# Install some base packages\n", - "conda install python jupyter jupyterlab ipykernel ipython ipywidgets pexpect pygments\n", + "conda install -y -c conda-forge python jupyter jupyterlab\n", "```\n", "\n", "Now reload this notebook and set its kernel to the `aoc-conda-env` you just created. And you're good to go!"