diff --git a/episodes/files/environment.yml b/episodes/files/environment.yml new file mode 100644 index 000000000..bb1b80490 --- /dev/null +++ b/episodes/files/environment.yml @@ -0,0 +1,11 @@ +name: dc-image +channels: + - conda-forge +dependencies: + - python>=3.11 + - jupyterlab + - numpy + - matplotlib + - scikit-image + - ipympl + - imageio diff --git a/learners/setup.md b/learners/setup.md index a12264ae0..43f49f299 100644 --- a/learners/setup.md +++ b/learners/setup.md @@ -7,39 +7,31 @@ Before joining the workshop or following the lesson, please complete the data an ## Data -The example images used in this lesson are available on [FigShare](https://figshare.com/). +The example images and a description of the Python environment used in this lesson are available on [FigShare](https://figshare.com/). To download the data, please visit [the dataset page for this workshop][figshare-data] and click the "Download all" button. -Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again, +Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again, e.g. your Desktop or a folder you have created for using in this workshop. (The name `data` is optional but recommended, as this is the name we will use to refer to the folder throughout the lesson.) ## Software -1. Download and install the latest [Anaconda - distribution](https://www.anaconda.com/download/) for your - operating system. Make sure to choose the Python 3 version (as - opposed to the one with Python 2). If you wish to use an existing - installation, be sure to upgrade your scikit-image to at least 0.19. - You can upgrade to the latest scikit-image using the shell command that follows. +1. Download and install the latest [Miniforge distribution of Python](https://conda-forge.org/download/) for your operating system. + ([See more detailed instructions from The Carpentries](https://carpentries.github.io/workshop-template/#python-1).) + If you already have a Python 3 setup that you are happy with, you can continue to use that (we recommend that you make sure your Python version is current). + The next step assumes that `conda` is available to manage your Python environment. +2. Set up an environment to work in during the lesson. + In a terminal (Linux/Mac) or the MiniForge Prompt application (Windows), navigate to the location where you saved the unzipped data for the lesson and run the following command: - ::::::::::::::::::::::::::::::::::::::::: callout - - ## Updating scikit-image in an existing Anaconda distribution - - ```shell - conda upgrade -y scikit-image + ```bash + conda env create -f environment.yml ``` - :::::::::::::::::::::::::::::::::::::::::::::::::: - -2. This lesson uses Matplotlib features to display images, and some - interactive features will be valuable. To enable the interactive - tools in JupyterLab, the `ipympl` package is required. The package - can be installed with the command + If prompted, allow `conda` to install the required libraries. +3. Activate the new environment you just created: - ```shell - conda install -c conda-forge ipympl + ```bash + conda activate dc-image ``` ::::::::::::::::::::::::::::::::::::::::: callout @@ -83,9 +75,9 @@ e.g. your Desktop or a folder you have created for using in this workshop. ## Instructions for Windows - Launch the Anaconda Prompt program and type `jupyter lab`. + Launch the Miniforge Prompt program and type `jupyter lab`. (Running this command on the standard Command Prompt will return an error: - `'conda' is not recognized as an internal or external command, operable program or batch file.`) + `'jupyter' is not recognized as an internal or external command, operable program or batch file.`) :::::::::::::::::::::::::