1 of 22

Lecture 01b – Python Installation

2 of 22

Goals for this video lecture

Build a modern scientific computing environment with Python

    • Version control with Git and Github
    • Install Python
    • Install VS Code

Launch you into “Assignment 01”

    • This will just check that you have everything setup correctly.

3 of 22

Section 1: Installing Git and getting organized

4 of 22

Create a new account on GitHub

  • Go to github.com
  • Choosing your username is a surprisingly important decision.
    • Most people end up using the same GitHub account across many years/jobs
    • Choose your username wisely.
      • Don’t be xX_noscope_CODR_Xx
  • You can associate it with whatever email you want, but I would suggest using one you know you have permanent access to.
  • E.g., I use my personal gmail account still.
    • Cause I don’t have tenure yet!
    • Also I don’t trust OIT.
      • Please don’t tell them I said so.
    • Of course I don’t trust Google either … so yeah.
  • Assignment 1 (described in a slide below) will ask you to email me your github repo name and/or username

5 of 22

Get the git software

  • Git-scm.com/downloads
  • Choose the right operating system and install with all default options.
  • Git vs. GitHub
    • Github is a website that hosts code and connects a community of coders.
    • Git is a “version control” software tool that records the history of files in a Git repository.
    • Nearly every coder uses Git to push their repository of code to GitHub.
  • Use the default options for everything
    • Unless you REALLY know what you’re doing.

6 of 22

Section 2: Installing Python

7 of 22

Download “Miniforge”

https://conda-forge.org/download/

If you have an “m1” or later chip, make sure you select the Apple Silicon option.

If you get a “Windows Protected your PC”, click more info then Run Anyway.

8 of 22

Install Miniforge

On Install For: Probably choose Just Me unless you know what you’re doing.

I strongly recommend you install it in C:\Users\<YOUR_USERNAME>\miniforge3

Keep all defaults EXCEPT make sure you do check “Add Miniforge3 to my PATH environment Variable”

9 of 22

Anaconda vs Conda vs Mamba vs Miniforge

  • Anaconda – Full Python distro with 1000+ libs; easy start, heavy, slower, license limits.
  • Conda – Core pkg/env manager; flexible, cross-language, but slow dependency solving.
  • Mamba – Fast C++ re-implementation of Conda; same commands, much quicker.
  • Miniforge – Minimal open installer; uses conda-forge, lightweight, ideal for reproducible setups.

10 of 22

Launch CMD prompt

  • On mac, it’s usually called “terminal”
  • Windows shortcut: I hit the start button and type “cmd” then click
  • Type “conda”, which will give you a nice list of conda commands.
    • If conda doesn’t work, try “conda init” first
  • You can explore a command by just typing e.g. “conda create”

11 of 22

Use git to get the class repository

  • In the Command Prompt, navigate to the repository you cloned
    • E.g. “cd c:/Users/jajohns/Files/apec_8222”
  • Once here, run “git clone https://github.com/<your_username>/apec_8222_2025
  • This will download the “apec_8222_2025” repo to your directory

12 of 22

IF you wanted to create a new “environment”

  • Change into the class’s root directory with “cd apec_8222_2025”
  • In the class repo’s root directory, which should look like c:/Users/jajohns/Files/apec_8222/apec_8222_2025, run the following two lines one after the other.
    • conda env create -f environment.yml -n YOUR_ENV_NAME
      • I recommend naming it env8222a for now
    • conda activate env8222a
  • The first command creates a fresh Python environment based on what the Repo needs. The second command activates it.
    • You can tell it is activated because now (base) is replaced with (env8222a)
    • We will be installing specific python packages to this environment

13 of 22

Section 3: Installing VS Code

14 of 22

Download Visual Studio Code (VS Code)

code.visualstudio.com/download

I recommend selecting the “User Installer”, 64-bit option for windows. is okay.

15 of 22

Install VS Code

Use the default install options with the exception of the two that start with

“Add Open with Code” action…

16 of 22

Launch VS Code

We’ll talk about it more in class, but VS Code is becoming the most-used “integrated development environment” (IDE) across nearly all programming languages, including remarkable growth among R users.

17 of 22

I prefer the light color scheme

Apparently that makes me in the tiny minority among hackernews, reddit/r/ProgrammerHumor or other centers of intelligencia for coding

18 of 22

Sign in with Sync

Enable Settings Sync

This will prompt you to Sign In.

Select Sign in with GitHub

19 of 22

Install the VS Code Python Extension

Click the extensions tab.

Then install the Python extension

20 of 22

You are now ready to do Assignment 01 on the course website!

Please enjoy this picture of what I assume (with no research) is a python.

21 of 22

�Appendix (optional)

22 of 22

If you didn’t set your path to have mamba in it:

The following windows command (replacing the username) will set it to the path.

SETX PATH "%PATH%;C:\Users\<YOUR_USERNAME>\miniforge;C:\Users\<YOUR_USERNAME>\miniforge;"