Software Setup

This guide will walk you through installing the software you’ll need for the course. Before diving in it’s worth understanding what you’re about to do at a high level.

First, you should be sure your operating system is up-to-date. If you did not already move through the Operating System Update steps, then go ahead and do that.

Next, you’ll install the software needed to write your own programs in the course. In general, to write your own programs you need two kinds of software installed: a programming language toolkit and a text editor designed for programming. For this course we’ll explore programming with the Python programming language using the Visual Studio Code text editor. These are two of the most widely used tools of their kind in 2020 and are highly applicable beyond the scope of this course.

Follow the instructions for your operating system, either Windows 10 or macOS.

Windows 10 Instructions

Before beginning, be sure you are using the latest version of Windows 10.

0. Install the Latest Python Programming Language Toolkit (3.8.5 or greater)

For these steps, be sure your web browser Window is maximized and be sure to follow step 4.0 closely that checks the option “Add Python 3.8 to Path” during install.

  1. Open the Python Website in another tab:
  2. Press the Downloads button in navigation.
  3. In the headline, you should see “Download the latest version for Windows”.
    • If, instead, you see “Download the latest version of Python” be sure your browser Window is maximized and refresh the web page.
  4. Press the Download Python 3.8.5 button. The download should begin.
    • If you are taken to another page without a download beginning, scroll down to the Files heading and select the file named Windows x86 executable installer.**
  5. Open the download once it completes and carefully follow the instructions below, especially the next one:
    1. IMPORTANT: Check the box on the first screen labelled “Add Python 3.8 to PATH”
      • Knowing exactly what this does is beyond your concern, but the gist is it makes it easier for other programs on your system to make use of Python.
    2. After checking the box of Step 0, click Install Now.
    3. Allow the installer to make changes if further prompted.
    4. Accept other defaults on following screens.
    5. Click the Close button to complete the Install.

1. Install the Visual Studio Code (VSCode) Text Editor

  1. Open the VSCode website in another tab:
  2. Select the large Download for Windows button
  3. Open the downloaded installer after its download completes
    1. Accept the licensing agreement
    2. You’re asked where to install VS Code. The suggested location is OK. Press Next.
    3. You’re asked if you want to add VS Code to your start menu. That’s OK, too. Press Next.
    4. Important Under additional tasks, check all of the options available.
      • These options make it easier for you to open files in VS Code.
    5. At Ready to Install, select Install.

2. Reboot your machine!

Reboot your computer now. Some settings of the applications you just installed will not take effect until you reboot. Attempting to continue on from this point without rebooting will lead to strange errors later.

Once you’ve completed this, you’ve got the necessary software installed! Great work!

macOS Instructions

Before beginning, be sure you are using the latest version of macOS.

0. Update Your Default Shell in the Terminal

There are two pieces of jargon in the title of this section. A “shell” is a program that serves as a concierge to your computer: you give it commands, such as asking it to run a program you’re working on, and the shell does the work of carrying out your command. A “terminal” is the program you will use to interact with your shell. Apple recently updated its recommended shell software to Z-shell, or zsh, so let’s be sure yours is configured to use it.

  1. Using Mac’s Spotlight Search, accessed by pressing Command + Spacebar or clicking the search icon near your clock, type Terminal and press enter. This starts the Terminal app, which may look like what hackers use in the movies, because it is.
  2. Let’s learn what shell program your terminal is using by default by typing the following (cryptic, based on what we know now) command and pressing enter: echo $SHELL (yes, that’s the word echo, followed by a space, and then a dollar sign followed immediately by the word SHELL in all capital letters, $SHELL)
  3. If you see /bin/bash in the text “printed” below your command, continue to next step to update your default. If, instead, you see /bin/zsh, you are all set and can jump to step 6.
  4. Since you saw bash instead of zsh, let’s change your default shell using the chsh program to be the location, or path, of the zsh shell program on your computer which is /bin/zsh. Type the following command, check that yours matches exactly, in both spaces and capitalization, and press enter: chsh -s /bin/zsh
  5. You will likely be asked for your computer’s password. When you type in your password you will not see any text appear on your screen, not even dots, but the keys you type are being received. Press enter once you’ve entered your password. If you see “Credentials could not be verified, username or password is invalid.” try running the command again and entering your laptop’s password again.
  6. This change will be applied to your next shell session, so type exit, close your Terminal again. Go back up to step 0, and continue from there, to confirm it was successful.
  7. Great! You can quit your shell session by typing exit, pressing enter, and then closing your Terminal window.

1. Install (or Update) the Python Programming Language Toolkit (3.8.5 or greater)

For these steps, be sure your Web Browser window is maximized.

  1. Open the Python Website in a new tab:
  2. Select the Downloads button in the navigation
  3. Look for the “Download latest version for Mac OS X”
    • If you instead see, “Download the latest version of Python”, make sure your browser is full screen and refresh the page.
  4. Click the Download Python 3.8.5 button. Your download should begin.
    • If you are brought to another page, scroll down to the Files section and select the macOS 64-bit installer.
  5. Open the downloaded package to begin the installer
    1. At Introduction screen: Continue
    2. At the Read Me screen: Continue
    3. At the License: Continue (Agree)
    4. At Installation Type: Install
    5. After Install completes, select Close and close any windows it popped up.
    6. If asked, move the installer to Trash

2. Configure your Shell to use the Latest Python

  1. Open a new Terminal window. If you still have one open from section 0, close it out and start a new one, because changes made during the installation of Python will not take effect until a new shell session begins.
  2. Give the command python3 --version, notice the 3 after the word python and two dashes at the front of --version, and press enter. You should see Python 3.8.5 (or greater) which indicates your install was successful. If not, try the steps above one more time and restart your computer before trying these. Otherwise, come work with us in office hours!
  3. Now try giving the command python --version, without the 3 from above. If you see Python 2.X.YY, where X and YY are irrelevant numbers, continue to the next step because Mac also includes a much older version of Python. This is confusing when you’re trying to learn modern Python! If you see the result Python 3.8.5 then you are all set and can continue to the next section on installing git.
  4. Let’s simplify life by making python refer to the latest version you just installed, not the old one. What the following command is doing is making a link between the name python and the version you just installed. The command is more advanced than where we are at, so do not worry yourself on its details. You should copy and paste the following command into your Terminal, and press enter, because the punctuation symbols need to match precisely.

sudo ln -s "$(which python3)" "$(dirname $(which python3))/python"

If you are prompted for a password, enter your computer’s password. You will not see any indication of your keystrokes show up as you type in your password, but they are being recorded. Press enter after typing your password invisibly.

  1. This change will only take place in a new shell session. Type the exit command, press enter, close your terminal. Go back to Step 0 and continue on until confirming python --version is successfully linked to Python 3.8.5 or greater.

3. Install the Visual Studio Code (VSCode) Text Editor

  1. Open the VSCode website in a new browser tab:
  2. Select the large Download for Mac button
  3. When you open this Zip download, it creates an application file named Visual Studio Code in your Downloads folder and opens that folder in a new Finder window.
  4. Confirm your Finder window sidebar is visible, it should be to the left of your files and you should see Applications listed under Favorites. If you do not see the sidebar, go to the View menu and select Show Sidebar. If you do not see Applications listed under Favorites, open the Finder menu, select Preferences…, and check Applications.
  5. To install Visual Studio Code as an Application, drag the Visual Studio Code icon into your Applications directory which you should see in the left-hand sidebar of the Finder window under Favorites.
  6. Open Spotlight Search again (Command + Space or the search icon by your clock) and search for “Code”. You should see Visual Studio Code in the results. Open it and it will likely ask to confirm it’s OK to open a file downloaded off the internet. Accept.
  7. You should see Visual Studio Code open to a Welcome tab. If you do, you’re all set and can close it for now and continue on.

Once you’ve completed this, you’ve got the necessary software installed! Great work!