You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please complete the setup at least a day in advance of the workshop. If you run into issues, contact the workshop organizers by email so you're ready to begin on time. The setup steps include:
3. Setup virtual environment with required packages
10
+
4. Download the data
7
11
8
-
### Installing Python
12
+
##1. Setup workshop folder
9
13
10
-
[Python][python] is a popular language for scientific computing, and a frequent choice
11
-
for machine learning as well.
12
-
To install Python, follow the [Beginner's Guide](https://wiki.python.org/moin/BeginnersGuide/Download) or head straight to the [download page](https://www.python.org/downloads/).
14
+
Create a folder on your desktop called `dl_workshop` for storing the workshop data and required packages.
13
15
14
-
Please set up your python environment at least a day in advance of the workshop.
15
-
If you encounter problems with the installation procedure, ask your workshop organizers via e-mail for assistance so
16
-
you are ready to go as soon as the workshop begins.
[Pip](https://pip.pypa.io/en/stable/) is the package management system built into Python.
23
-
Pip should be available in your system once you installed Python successfully.
29
+
[Python][python] is a popular language for scientific computing and a frequent choice for machine learning.
24
30
25
-
Open a terminal (Mac/Linux) or Command Prompt (Windows) and run the following commands.
31
+
Python version requirement: This workshop requires Python 3.11.9. Newer versions like 3.12 or 3.13 are not yet fully compatible with TensorFlow and may cause issues. Even Python 3.11.9 may have some edge cases, but it works well enough to be the default in Google Colab and is stable for the purposes of this workshop.
26
32
27
-
1. Create a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments) called `dl_workshop`:
33
+
To install Python 3.11.9, go to the [official 3.11.9 downloads page](https://www.python.org/downloads/release/python-3119//). Choose the installer that matches your operating system (Windows, macOS, or Linux).
28
34
29
-
::: spoiler
35
+
Please set up your Python environment at least a day in advance of the workshop. If you run into issues with installation, contact the workshop organizers by email so you're ready to begin on time.
30
36
31
-
### On Linux/macOs
37
+
38
+
### Determine which `python` command to use for downstream setup steps
39
+
40
+
Different systems and Python installations (e.g., Anaconda, Git Bash, system Python, Windows Store, etc.) may register different command names. This quick check helps identify which one points to Python 3.11.9 on your machine.
41
+
42
+
Run the following in your terminal ([Git Bash recommended for Windows users](https://git-scm.com/downloads), Anaconda Prompt, or macOS/Linux shell):
32
43
33
44
```shell
34
-
python3 -m venv dl_workshop
45
+
python --version
46
+
py --version
47
+
python3 --version
35
48
```
36
49
37
-
:::
50
+
Use whichever one returns Python 3.11.9 for the rest of the setup steps.
38
51
39
-
::: spoiler
52
+
Example output:
40
53
41
-
### On Windows
54
+
```output
55
+
$ python --version
56
+
Python 3.11.9
57
+
58
+
$ py --version
59
+
Python 3.13.2
60
+
61
+
$ python3 --version
62
+
Python was not found...
63
+
```
64
+
In this case, use python throughout the remainder of the instructions.
65
+
66
+
If none of the commands return Python 3.11.9:
67
+
68
+
- Download and install Python 3.11.9. On Windows, be sure to check "Add Python to PATH" during installation
69
+
- If you're on Windows using Anaconda Prompt, try using [Git Bash](https://git-scm.com/downloads) instead.
70
+
- Then re-run the checks above in a new terminal window
71
+
72
+
If you're still stuck, ask the workshop organizers for help before proceeding.
73
+
74
+
## 3. Configure virtual environment
75
+
76
+
Open a terminal (Mac/Linux) or Command Prompt (Windows) and run the following commands.
77
+
78
+
1. Create a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments) called `venv` using the "venv" command:
42
79
43
80
```shell
44
-
py -m venv dl_workshop
81
+
# Use python3 or py instead if one of them points to 3.11.9.
82
+
python -m venv venv # 1st "venv" is commmand, 2nd venv is name of the virtual environment / folder
45
83
```
46
84
47
-
:::
85
+
If you run the `ls` command from `~/Desktop/dl_workshop`, you should see a new `venv` folder inside it
86
+
87
+
```shell
88
+
ls
89
+
```
90
+
91
+
```output
92
+
venv/
93
+
```
48
94
49
95
2. Activate the newly created virtual environment:
If you're using Git Bash on Windows, you need to add the source command first.
116
+
117
+
```shell
118
+
source venv/Scripts/activate
119
+
```
69
120
:::
70
121
71
-
Remember that you need to activate your environment every time you restart your terminal!
122
+
**Note**: Remember that you need to activate your environment every time you restart your terminal, and before you launch Jupyter Lab!
72
123
73
-
3. Install the required packages:
124
+
3. After activating the enviornment, upgrade pip. This is a good practice to follow when you first initialize your virtual environment (beforing installing additional packages). [Pip](https://pip.pypa.io/en/stable/) is the package management system built into Python.Pip should be available in your system once you installed Python successfully.
125
+
126
+
```shell
127
+
# remember: use python3 or py instead if it points to 3.11.9
128
+
python -m pip install --upgrade pip
129
+
```
130
+
131
+
4. Install the required packages:
132
+
133
+
Follow the OS-specific instructions below. NOte that It may take 10-20 minutes to install everything.
74
134
75
135
::: spoiler
76
136
77
137
### On Linux/macOs
78
138
79
139
```shell
140
+
# Use python or py instead if one of them points to 3.11.9.
This should output the versions of all required packages without giving errors.
137
209
Most versions will work fine with this lesson, but:
210
+
138
211
- For Keras and Tensorflow, the minimum version is 2.12.0
139
212
- For sklearn, the minimum version is 1.2.2
140
213
141
-
## Fallback option: cloud environment
214
+
###Fallback option: cloud environment
142
215
If a local installation does not work for you, it is also possible to run this lesson in [Binder Hub](https://mybinder.org/v2/gh/carpentries-incubator/deep-learning-intro/scaffolds). This should give you an environment with all the required software and data to run this lesson, nothing which is saved will be stored, please copy any files you want to keep. Note that if you are the first person to launch this in the last few days it can take several minutes to startup. The second person who loads it should find it loads in under a minute. Instructors who intend to use this option should start it themselves shortly before the workshop begins.
143
216
144
217
Alternatively you can use [Google colab](https://colab.research.google.com/). If you open a jupyter notebook here, the required packages are already pre-installed. Note that google colab uses jupyter notebook instead of Jupyter Lab.
145
218
146
-
## Downloading the required datasets
219
+
## 4. Downloading the required datasets
220
+
221
+
Download the [weather dataset prediction csv][weatherdata] and [Dollar street dataset (4 files in total)][dollar-street]. Create a subfolder in your workshop folder called data, `~/Desktop/dl_workshop/data`, and move all 5 files to the data subfolder:
**Note**: If you end up using Google Colab for the workshop, you'll want to create a folder called `dl_workshop` within your Google drive, and then create the same `data` subfolder as above with all 5 files uploaded. **Avoid uploading the `venv` folder to your google drive**; you'll be using Colab's pre-built environment instead, and the `venv` folder contains MANY files from the libraries you installed.
230
+
231
+
You can access files from Google drive using Colab and the following code:
232
+
233
+
```python
234
+
from google.colab import drive
235
+
drive.mount('/content/drive')
236
+
```
237
+
238
+
A prompt will appear asking you to authorize access to your Google Drive. After authorization, your Drive will be accessible under `/content/drive/My Drive/`. You can use standard Python I/O or libraries like pandas, os, glob, etc. to interact with files. Example below:
0 commit comments