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
- Install Miniforge, unless you already have it.
- Create the workshop environment. This installs Python, NumPy, and Matplotlib.
- Download and extract the lesson files.
- Check your setup.
- Complete the pre-workshop survey. If you already completed it for this series, you do not need to complete it again.
- 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.
- Open https://conda-forge.org/download/ with your web browser.
- Download the Miniforge for Windows installer
- 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.”
- Follow through the installer using all of the defaults for installation except make sure to check Add Miniforge3 to my PATH environment variable.
- When installation finishes, open the Start menu and launch Miniforge Prompt.
- In Miniforge Prompt, type
conda init bashand press Enter. Close any open Git Bash windows, then open a new Git Bash window.
- Open https://conda-forge.org/download/ with your web browser.
- 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. -
Open a terminal window and navigate to the directory where the executable is downloaded
(e.g.,
cd ~/Downloads). -
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). -
Follow the text-only prompts in the terminal. To move through the text, press
Spacebar.
- Type
yesand 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
yesand press Enter (or Return) to prepend Miniforge to yourPATH(this makes the Miniforge distribution the default Python).
- Type
- Close the terminal window, then open a new one before continuing.
- Open https://conda-forge.org/download/ with your web browser.
- 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. -
Open a terminal window and navigate to the directory where the executable is downloaded
(e.g.,
cd ~/Downloads). -
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). -
Follow the text-only prompts in the terminal.
To move through the text, press Spacebar.
- Type
yesand 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
yesand press Enter (or Return) to prepend Miniforge to yourPATH(this makes the Miniforge distribution the default Python).
- Type
- 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.
-
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.txtto the filename. - Open Git Bash. This is where you will type the following commands.
-
Navigate to the folder where you saved the file. If it is in your usual
Downloads folder, enter:
If your Downloads folder is redirected through OneDrive, navigate to its actual location instead, as you did in the earlier workshops.cd ~/Downloads -
Check that Git Bash can see the file:
You should see the filename printed. If you see “No such file or directory,” check the folder and filename before continuing.ls carpentries_environment.yml -
Create the workshop environment:
Miniforge will read the file and install Python, NumPy, Matplotlib, and the other packages listed in it. This may take several minutes.conda env create -f carpentries_environment.yml -
When the command finishes and you can type again, activate your new environment by entering:
You should seeconda activate carpentries(carpentries)near the beginning of the Git Bash prompt.
-
Right-click the workshop
environment file
and select Save Link As or
Download Linked File As. Save it in Downloads as
carpentries_environment.yml. - Open Terminal. You can find it using Spotlight search or in Applications → Utilities. Click in the Terminal window to type commands.
-
If you saved the file in Downloads, type this command and press
Return:
Miniforge will read the file and install the workshop packages. This may take several minutes.conda env create -f ~/Downloads/carpentries_environment.yml -
When the command finishes and you can type again, activate your new environment by entering:
You should now seeconda activate carpentries(carpentries)near the beginning of the prompt.
-
Right-click the workshop
environment file
and select Save Link As. Save it in Downloads as
carpentries_environment.yml. - Open your computer's Terminal application. Click in the Terminal window to type commands.
-
If you saved the file in Downloads, type this command and press
Enter:
Miniforge will read the file and install the workshop packages. This may take several minutes.conda env create -f ~/Downloads/carpentries_environment.yml -
When the command finishes and you can type again, activate your new environment by entering:
You should now seeconda activate carpentries(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
- Download the lesson data ZIP file and the lesson code ZIP file.
- Create a folder named
swc-pythonon your Desktop. - Move both downloaded ZIP files into
swc-python. - Extract both ZIP files. Some computers will create folders named
python-novice-inflammation-dataandpython-novice-inflammation-code. If that happens, open each of those folders and move thedataandcodefolders inside them up intoswc-python. - Check the result: opening
swc-pythonshould showdataandcodedirectly inside it. Opendataand confirm that it containsinflammation-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.