Skip to content

Commit 55346f2

Browse files
authored
set up an environment for the workshop
1 parent 349df13 commit 55346f2

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

episodes/files/environment.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: dc-image
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python>=3.11
6+
- jupyterlab
7+
- numpy
8+
- matplotlib
9+
- pandas
10+
- scikit-image
11+
- ipympl

learners/setup.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Before joining the workshop or following the lesson, please complete the data an
77

88
## Data
99

10-
The example images used in this lesson are available on [FigShare](https://figshare.com/).
10+
The example images and a description of the Python environment used in this lesson are available on [FigShare](https://figshare.com/).
1111
To download the data, please visit [the dataset page for this workshop][figshare-data]
1212
and click the "Download all" button.
1313
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again,
@@ -18,26 +18,20 @@ e.g. your Desktop or a folder you have created for using in this workshop.
1818

1919
1. Download and install the latest [MiniForge distribution of Python](https://conda-forge.org/download/) for your operating system.
2020
Make sure to choose the Python 3 version (as opposed to the one with Python 2).
21-
If you wish to use an existing installation, be sure to upgrade your scikit-image to at least 0.19.
22-
You can upgrade to the latest scikit-image using the shell command that follows.
21+
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).
22+
The next step assumes that `conda` is available to manage your Python environment.
23+
2. Setup an environment to work in during the lesson.
24+
In a terminal or the MiniForge Prompt application, navigate to the location where you saved the unzipped data for the lesson and run the following command:
2325

24-
::::::::::::::::::::::::::::::::::::::::: callout
25-
26-
## Updating scikit-image in an existing MiniForge distribution
27-
28-
```shell
29-
conda upgrade -y scikit-image
26+
```bash
27+
conda env create -f environment.yml
3028
```
3129

32-
::::::::::::::::::::::::::::::::::::::::::::::::::
33-
34-
2. This lesson uses Matplotlib features to display images, and some
35-
interactive features will be valuable. To enable the interactive
36-
tools in JupyterLab, the `ipympl` package is required. The package
37-
can be installed with the command
30+
If prompted, allow `conda` to install the required libraries.
31+
3. Activate the new environment you just created:
3832

39-
```shell
40-
conda install -c conda-forge ipympl
33+
```bash
34+
conda activate dc-image
4135
```
4236

4337
::::::::::::::::::::::::::::::::::::::::: callout

0 commit comments

Comments
 (0)