Lesson 2
The Basic Elements
Chapter 2: Installing Python
Installing Python on Windows
You can skip straight to the next page if you are not using Windows.
Windows does not come with a Python interpreter out of the box, so you will need to install this.
There are different ways for you to do this.
I will assume that you are using an up-to-date version of Windows 11.
WinGet is a package manager for windows that comes with the latest version of Windows 11.
Launch the Terminal app. You should be on Windows Powershell (Command Prompt is also fine).
Type winget install Python.Python.3.14 and follow the instructions to install Python 3.14.
I will assume that you are using an up-to-date version of Windows 11.
Option 1
Launch the Terminal app. You should be on Windows Powershell (Command Prompt is also fine).
Type python or python3. If Python is not yet installed, Windows will automatically redirect you to the Microsoft Store to the Python Install Manager. Install Python Install Manager, and then follow the instructions to install the latest version of Python which as of July 2026 is 3.14.6.
Option 2
Visit the Microsoft Store (from the Start Menu), search for Python 3.13, and install it from there.
Unfortunately, Python 3.14 is not yet available via the Microsoft Store as of July 2026. It should be fine to use Python 3.13 for most of the course - just be aware that your coursework assignments will be assessed using Python 3.14 so you will be responsible for checking that your code works on that version. You can install Python 3.14 in a few months when it becomes available on the Microsoft Store.
Download the appropriate Python installer from the official python.org website.
Run the installer to install Python on your machine.
Check “Add Python 3.14 to PATH” when you install. This will allow you to run Python from the command line (something we will be doing quite a lot).
This is for the techie amongst you!
If you are using the latest version of Windows 11, you can install a virtual Linux bash shell on Windows via what is known as Windows Subsystem for Linux (WSL, more precisely WSL2). This will allow you to run Linux in a terminal directly on Windows, even directly on your files on Windows. You can even run selected Linux Graphical apps from Windows.
This is a good way to start getting used to using Linux machines and command lines - you might have to run experiments remotely on the departmental/university Linux machines during your degree!
Step 1: Install WSL
You will first need to install WSL. Launch the Terminal app. You should be on Windows Powershell (Command Prompt is also fine).
Type wsl --install and follow the instructions.
Step 2: Install Ubuntu
The lab machines in the department run on Ubuntu 26.04, so ideally your WSL installation should use this distribution by default.
Restart the Terminal app. Install Ubuntu 26.04 directly by typing wsl --install Ubuntu-26.04 on the terminal. Follow the instructions. You will need to choose a username and password for the Ubuntu installation. I recommend using your university username as it will save you from having to enter a different username when using SSH to log into departmental machines (but it’s up to you!)
You should now be able to access Ubuntu any time via the Terminal app (via the “Down arrow” on the tab bar). If you like, you can also set Ubuntu to be your default profile via the Settings.
Tip: You can access your C: drive by typing cd /mnt/c on Ubuntu.
Step 3: Test Python installation
Python 3.14 should be installed by default if you have installed Ubuntu 26.04 correctly. Type in the following in Ubuntu to check that it has been installed correctly.
user@MACHINE:~$ python3 -V
Python 3.14.4
I recommend you also read the Python installation instructions for Unix/Linux on the next page, especially about system vs. user installations.
Check installation
Once you have installed Python, launch the Terminal app. Type in the following to check that Python has been installed correctly.
PS C:\Users\username> python -V
Python 3.14.3