Setup

Before You Start

Applied Python uses Python 3 and JupyterLab on a personal computer. No previous Python experience is required; being able to create folders, download files and locate them on your computer will help. Prepare the software and data below before the session and keep a note of any step that fails.

If you already have a working Python environment, use the checks below rather than installing a second copy. Follow your organisation’s software installation arrangements on a managed device; if installation is unavailable, contact the organiser before the session so that shared-screen practice or a supported environment can be arranged.

Install Python with Anaconda

The established course setup uses Anaconda Distribution, which includes Python, JupyterLab and scientific packages. Follow its current installation guidance for your operating system and check the download’s terms against your institution’s arrangements.

  1. Open the Anaconda download page.
  2. Download the Anaconda installer (if you are not sure which version to choose, you probably want the Graphical Installer).
  3. Run the installer using the recommended options for your system. Do not change your system PATH just to follow this course; launch through Anaconda Navigator or the environment’s supported terminal.

Launch JupyterLab

This course uses JupyterLab, a programming environment that runs in a web browser. After installing Anaconda, follow the official launch instructions, create a Python notebook and run print("Python is ready") in a cell. If you use an existing environment, the JupyterLab documentation explains kernel management.

Obtain lesson materials

  1. Download python-novice-inflammation-data.zip and python-novice-inflammation-code.zip.
  2. Create a folder called swc-python on your Desktop.
  3. Move downloaded files to swc-python.
  4. Unzip the files.

You should see two folders called data and code in the swc-python directory on your Desktop.

Note

Create your practice notebook directly inside swc-python, alongside data and code. The lessons use paths such as data/inflammation-01.csv; placing a notebook inside data would change the path needed to read that file.

Check Your Setup

Run this in your practice notebook. These are the libraries used by the data and modelling lessons; a successful import checks availability in the selected notebook kernel.

import sys
import numpy
import matplotlib
import pandas
import sklearn
import statsmodels

print(sys.version)

Then check that the notebook can read the downloaded teaching data:

from pathlib import Path

data_path = Path("data/inflammation-01.csv")
print(data_path.exists())
data = numpy.loadtxt(data_path, delimiter=",")
print(data.shape)

The file check should print True. If an import fails, record the package name and error and ask the organiser for help with that environment. If the file check fails, inspect the notebook’s folder and whether the ZIP has been extracted. The course’s inflammation files contain synthetic teaching data; use them for practice.

Other Python Environments

Although this course uses JupyterLab, there are other ways to run Python that you may want to explore. These are optional alternatives, not additional preparation requirements; check that the chosen environment can access the lesson files and packages.

After Setup

Start with Types, Variables, and Basic Operations. The learner Additional Material page provides a checked notebook practice workflow and official references for later use. Use Digital Skills Clinics for follow-up help with a specific coding or analysis task.

Course Navigation

Course Overview · Setup · Additional Material · Reference · Discussion