Programming with Python

Prepare for Programming with Python

Thursday, September 24, 2026 and Thursday, October 1, 2026
6:00-9:00 PM Central Time
Bruner Hall, Room 126

No previous Python experience is required. We will use the regular Python interpreter in a terminal. Please complete the setup before the first meeting and bring the same laptop to both meetings.

What to bring

  • A Windows, macOS, or Linux laptop
  • Your laptop’s charging cable

Complete these steps before the workshop

  1. Install Miniforge, unless you already have it.
  2. Create the workshop environment. This installs Python, NumPy, and Matplotlib.
  3. Download and extract the lesson files.
  4. Check your setup.
  5. Complete the pre-workshop survey. If you already completed it for this series, you do not need to complete it again.
  6. Review The Carpentries Code of Conduct.

Install Miniforge

Miniforge will let us install Python and the scientific packages used in the lesson together. If you already have Miniforge, skip to Create the workshop environment. You do not need a separate Python installation. On Windows, if you already have Miniforge but have not used it in Git Bash, open Miniforge Prompt, run conda init bash, then close and reopen Git Bash before creating the workshop environment.

  1. Open https://conda-forge.org/download/ with your web browser.
  2. Download the Miniforge for Windows installer
  3. Double-click on the downloaded file (Something like, Miniforge3-Windows-x86_64.exe)
    • If Windows displays a “Windows protected your PC” message, select “More info,” then “Run anyway.”
  4. Follow through the installer using all of the defaults for installation except make sure to check Add Miniforge3 to my PATH environment variable.
  5. When installation finishes, open the Start menu and launch Miniforge Prompt.
  6. In Miniforge Prompt, type conda init bash and press Enter. Close any open Git Bash windows, then open a new Git Bash window.
  1. Open https://conda-forge.org/download/ with your web browser.
  2. Download the appropriate Miniforge installer for macOS
    The following steps require using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.
  3. Open a terminal window and navigate to the directory where the executable is downloaded (e.g., cd ~/Downloads).
  4. Type
    bash Miniforge3-
    and then press Tab to autocomplete the full file name. The name of file you just downloaded should appear. Press Enter (or Return depending on your keyboard).
  5. Follow the text-only prompts in the terminal. To move through the text, press Spacebar.
    • Type yes and press Enter (or Return) to approve the license.
    • Press Enter (or Return) to approve the default location for the files.
    • When the installer asks whether to initialize conda for your shell, type yes and press Enter (or Return) to prepend Miniforge to your PATH (this makes the Miniforge distribution the default Python).
  6. Close the terminal window, then open a new one before continuing.
  1. Open https://conda-forge.org/download/ with your web browser.
  2. Download the appropriate Miniforge installer for Linux
    The following steps require using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.
  3. Open a terminal window and navigate to the directory where the executable is downloaded (e.g., cd ~/Downloads).
  4. Type
    bash Miniforge3-
    and then press Tab to autocomplete the full file name. The name of file you just downloaded should appear. Press Enter (or Return depending on your keyboard).
  5. Follow the text-only prompts in the terminal. To move through the text, press Spacebar.
    • Type yes and press Enter (or Return) to approve the license.
    • Press Enter (or Return) to approve the default location for the files.
    • When the installer asks whether to initialize conda for your shell, type yes and press Enter (or Return) to prepend Miniforge to your PATH (this makes the Miniforge distribution the default Python).
  6. Close the terminal window, then open a new one before continuing.

Create the workshop environment

A Python environment keeps the version of Python and the packages for this workshop together. The file below tells Miniforge which packages to install, including NumPy and Matplotlib. You create this environment only once; you activate it each time you return to the workshop.

  1. Right-click the workshop environment file and select Save link as. Save it in Downloads with the name carpentries_environment.yml. Check that your browser has not added .txt to the filename.
  2. Open Git Bash. This is where you will type the following commands.
  3. Navigate to the folder where you saved the file. If it is in your usual Downloads folder, enter:
    cd ~/Downloads
    If your Downloads folder is redirected through OneDrive, navigate to its actual location instead, as you did in the earlier workshops.
  4. Check that Git Bash can see the file:
    ls carpentries_environment.yml
    You should see the filename printed. If you see “No such file or directory,” check the folder and filename before continuing.
  5. Create the workshop environment:
    conda env create -f carpentries_environment.yml
    Miniforge will read the file and install Python, NumPy, Matplotlib, and the other packages listed in it. This may take several minutes.
  6. When the command finishes and you can type again, activate your new environment by entering:
    conda activate carpentries
    You should see (carpentries) near the beginning of the Git Bash prompt.
  1. Right-click the workshop environment file and select Save Link As or Download Linked File As. Save it in Downloads as carpentries_environment.yml.
  2. Open Terminal. You can find it using Spotlight search or in Applications → Utilities. Click in the Terminal window to type commands.
  3. If you saved the file in Downloads, type this command and press Return:
    conda env create -f ~/Downloads/carpentries_environment.yml
    Miniforge will read the file and install the workshop packages. This may take several minutes.
  4. When the command finishes and you can type again, activate your new environment by entering:
    conda activate carpentries
    You should now see (carpentries) near the beginning of the prompt.
  1. Right-click the workshop environment file and select Save Link As. Save it in Downloads as carpentries_environment.yml.
  2. Open your computer's Terminal application. Click in the Terminal window to type commands.
  3. If you saved the file in Downloads, type this command and press Enter:
    conda env create -f ~/Downloads/carpentries_environment.yml
    Miniforge will read the file and install the workshop packages. This may take several minutes.
  4. When the command finishes and you can type again, activate your new environment by entering:
    conda activate carpentries
    You should now see (carpentries) near the beginning of the prompt.

For the second workshop meeting: Open Git Bash on Windows, or Terminal on macOS or Linux, and run conda activate carpentries. You do not need to download the environment file or create the environment again.

Download the lesson files

  1. Download the lesson data ZIP file and the lesson code ZIP file.
  2. Create a folder named swc-python on your Desktop.
  3. Move both downloaded ZIP files into swc-python.
  4. Extract both ZIP files. Some computers will create folders named python-novice-inflammation-data and python-novice-inflammation-code. If that happens, open each of those folders and move the data and code folders inside them up into swc-python.
  5. Check the result: opening swc-python should show data and code directly inside it. Open data and confirm that it contains inflammation-01.csv.

If your Desktop is redirected through OneDrive, use the Desktop location you have used in the previous workshops.

Check your setup

Open Git Bash on Windows or Terminal on macOS or Linux. Activate the workshop environment:

conda activate carpentries

You should see (carpentries) near the beginning of the prompt. Now check that Python can load the packages used in the lesson:

python -c "import numpy, matplotlib.pyplot; print('Python setup is ready')"

If you see Python setup is ready without an error, the software is ready.

Finally, confirm that your Desktop swc-python folder contains data and code directly inside it, and that data contains inflammation-01.csv.

During the workshop, we will start the interactive Python interpreter with winpty python in Git Bash or python in Terminal.