You do not need to know how to code. You need a laptop, about an hour, and the willingness to type things you do not understand yet.
By the end of this page you will have typed a line, pressed two keys, and watched your laptop work out an answer. That is all a program is.
Right now your laptop cannot do that. It can browse and it can play video, but nobody has put the tools on it. This page puts the tools on it.
Installing things is the part where most people quit. Not because it is hard, but because something goes wrong and nobody says what it means.
So every step here tells you what you should see. If you see that, carry on. If you see something else, there is a box underneath telling you what it means and what to do. You will not need to ask anybody.
Every other page in this course promises you exact numbers, because the course controls the data. This page cannot. Your laptop is yours, and I have never seen it.
So when this page says you should see something, take it as close enough rather than exact. If a version number here says 3.12 and yours says 3.13, you are fine.
You will see these words everywhere from now on. Read them once. You do not have to remember them. You will meet each one again when it matters.
sklearn to use it. Two names, one thing, and nobody warns you.band-00.ipynb.Nobody learned these words by reading them. You will learn them by using them in the next hour. Come back to this list when a word stops making sense.
The next part is different depending on your laptop. Work out which one you have, then read only your part.
Write down which one you have. Every later step will say which laptop it is for.
Python is free. It comes from one place. Do not download it from anywhere else.
Go to python.org in your browser. Click Downloads. There is a big yellow button with a version number on it. Click it.
A file downloading, with a name that starts python-3 and ends .exe.
Open the file you just downloaded. A window appears with two buttons and some tick boxes at the bottom.
Before you click anything, look at the tick boxes at the bottom. One of them mentions PATH. Tick it.
This is the single most skipped step in all of programming. If you skip it, Python installs fine and then your laptop cannot find it, and the error you get later says nothing about this box.
The PATH box with a tick in it. Then click Install Now and wait.
When it finishes, close the window.
Go to python.org in your browser. Click Downloads. There is a big yellow button with a version number on it. Click it.
A file downloading, with a name that starts python-3 and ends .pkg.
Open the file. Click Continue until it installs. There is no box to tick on a Mac.
Your Mac already had a Python on it before you started. That is normal and it is old. The one you just installed sits alongside it. On a Mac you always type python3, with the 3, so you get the new one.
You almost certainly have Python already. Skip to Part 4 and check. If the check fails, install it with your package manager.
You installed something. Now you find out whether it worked. Do not skip this. Finding out now takes two minutes. Finding out in Step 0 costs you an evening.
cmd. Press Enter. A black window opens.terminal. Press Enter. A white or black window opens.This window is waiting for you to type a command. It will do nothing until you press Enter.
Type this and press Enter. On a Mac and on Linux, use python3. On Windows, use python.
python3 --version
A line starting Python 3. and then some more numbers. Anything from 3.11 upwards is fine.
That is Python telling you it is installed and awake. You have just run your first command.
This is the PATH box from Part 3. It was not ticked.
You do not have to understand PATH. You have to install Python again.
Run the installer file again and choose Uninstall. Then run it a second time for a fresh install. On the very first screen, before you click anything, tick the box at the bottom. Depending on your version it says Add python.exe to PATH or Add Python to environment variables. Both are the same box.
Then close the terminal, open a new one, and try again.
A new terminal matters. An open one does not notice the change.
Windows does this when it cannot find a real Python. It is the same problem as above. Do not install from the Store. Fix the PATH box instead.
Most likely you typed python without the 3. On a Mac it is always python3. Try again with the 3 on the end.
If python3 itself brings up a box offering to install developer tools, let it. That is your Mac fetching the pieces it needs, and it only happens once.
Your laptop found an older Python that was already there. The course needs 3.11 or above, because the newest pandas will not install below it. Install from python.org as in Part 3, then close this terminal and open a new one.
Python on its own cannot open a table. You need three libraries. Pandas handles tables. JupyterLab gives you the notebooks you work in. Scikit-learn holds the models, which you meet in Step 2.
You install libraries with a tool called pip. It comes with the Python you installed from python.org in Part 3. Type this one line and press Enter.
python3 -m pip install pandas jupyterlab scikit-learn
On Windows, use python instead of python3.
Lots of text will scroll past. That is normal. It is downloading. Wait until the typing prompt comes back.
Near the end, a line starting Successfully installed followed by a long list of names, with pandas, jupyterlab and scikit-learn among them.
Then the prompt comes back and waits for you again.
Some Linux versions ship Python without it. Install it with your package manager, the same way you installed Python: on Ubuntu or Debian that is sudo apt install python3-pip, and on Fedora sudo dnf install python3-pip. Then run the line above again.
Good. It was already there. Carry on.
Ignore it. A warning is not an error. The difference matters, and you will meet it again: a warning is your laptop mentioning something. An error is your laptop refusing.
Some Linux and Mac systems protect their own Python from being changed. Read to the end of that message: it names the way out, and the way out is a longer command.
python3 -m pip install --break-system-packages pandas jupyterlab scikit-learn
The name sounds alarming and is not. It means "yes, I know, do it anyway". These three libraries do not break anything.
Adding --user instead does not get past this. It is the first thing everybody tries and it fails with the same message.
Read the last three lines, not the first thirty. The answer is almost always in the last three.
If those lines mention a network or a proxy, you are behind a connection that blocks it. Try a different network.
The course is a folder of files. It has the pages, the notebooks and the data in it.
Open your browser and go to the course page:
https://github.com/ehoneahobed/ml-course
That is GitHub, a website where people keep folders of files so other people can copy them. Near the top of the file list there is a green button that says Code. Click it, then click Download ZIP.
Find the file you downloaded and unzip it. On Windows, right click and choose Extract All. On a Mac, double click it.
Move the unzipped folder somewhere you will find it again. Your Documents folder is fine. Do not leave it in Downloads, because you will delete it by accident.
A folder holding one .ipynb file per step that has been built so far, starting with band-00.ipynb, plus folders called data, bands and tools. More notebooks appear as more steps are written, so do not worry about the exact count.
Now tell your terminal to go and stand in that folder. Type cd, then a space, then drag the folder from your file browser onto the terminal window and let go. The path appears. Press Enter.
The letters cd mean change directory. Directory is an old word for folder.
The prompt changes to show the folder name. Then type dir on Windows, or ls on a Mac or Linux, and press Enter.
You should see band-00.ipynb in the list. If you do not, your terminal is standing somewhere else.
The notebooks look for the data at data/bank.csv. That only works if your terminal is standing in the course folder when you start.
If you get a FileNotFoundError later, this is why, and coming back here fixes it.
From the same terminal, in the same folder, type this and press Enter.
jupyter lab
Text scrolling in the terminal, and then your browser opens on its own with a page called JupyterLab. Down the left is a list of the files in your course folder.
Leave the terminal window open. Closing it stops JupyterLab. It looks like a website but it is running on your own laptop.
Part 5 did not finish, or it installed somewhere your laptop does not look. Try this instead, which asks Python to run it directly.
python3 -m jupyter lab
Look in the terminal for a line starting http://localhost:8888. Copy that whole line, including the long code after token=, and paste it into your browser.
In the file list on the left, double click band-00.ipynb. It opens as a notebook. You will see boxes. Those are cells.
Look at the boxes. There are two kinds and you need to tell them apart.
[ ]: written just to their left.Click on the first code cell, the first grey one with brackets. A blue bar appears down its left side. That means it is the one that will run.
Hold Shift and press Enter.
Text appear underneath the cell, and the blue bar move down to the next one.
The first cell prints your Python version and your pandas version. Two lines. That is your output.
It is still working. The star means running. Wait. The star becomes a number when it is done.
If it stays a star for more than a minute on the first cell, go to the top menu, choose Kernel, then Restart Kernel, and run it again.
The steps keep telling you to write things down in your notebook. Here is how, because it is not obvious.
Scroll down to a text cell that says My prediction. Double click on it. It turns into an editable box, and the neat writing turns into plain text with some symbols in it. Type your answer at the end.
Then hold Shift and press Enter, the same as running a cell. It turns back into neat writing with your answer in it.
Your own words sitting in the notebook, in the same style as the rest of the writing.
Do that now, once, on any text cell, so you know you can. Every step asks for it repeatedly.
Paper works too, and for the pen and paper parts it is better. When a step says notebook, either is fine. What is not fine is answering in your head.
You wrote nothing. You pressed two keys, and your laptop read some instructions somebody else wrote, followed them in order, and told you the answer.
That is the whole job. Everything after this is about which instructions, and whether the answer means anything.
You will see errors constantly. Everybody does, forever. The difference between somebody who can do this and somebody who cannot is not how many errors they get. It is whether they read them.
So make one now, while nothing is at stake.
Go to the empty cell at the very bottom of the notebook. Click in it and type this, exactly, with the spelling mistake.
prnt("hello")
Then hold Shift and press Enter.
Red text. The last line says NameError: name 'prnt' is not defined.
If you ever run the same thing in a terminal rather than a notebook, Python adds a helpful guess on the end: Did you mean: 'print'?. Same error, one extra sentence.
Read that last line slowly. It is not shouting at you. It is telling you exactly what happened: it looked for something called prnt and there is no such thing.
Now fix the spelling and run it again.
hello, in plain black text, underneath the cell.
Now make a different mistake. Type this and run it.
print("hello"
Red text again, and this time it says SyntaxError. A different error, because a different thing went wrong. You left a bracket open.
NameError means it could not find something. SyntaxError means you typed something it could not read.You now know more about errors than most people who have been coding for a month.
All five, or you will lose an evening in Step 0.
python3 --version prints 3.11 or higher.jupyter lab opens in your browser.band-00.ipynb runs and prints two lines.import pandas, sklearn runs and prints nothing at all. Nothing is the right answer here: it means both libraries are there. A red ModuleNotFoundError means Part 5 did not finish.Point four is not padding. Step 0 hides a cell that misbehaves without complaining at all, and you are meant to find it. Knowing what a real error looks like is how you notice that this one is missing.