Setup: Tech stack OLD DO NOT USE
As with any computer science or data science course, several tools and software packages are needed for this course. These tools are not used by the typical consumer, so most Windows or macOS installations will not include them. Even on machines which do include them (such as many Linux distributions), they may still need some configuration. Below you will find guides to install the tech stack for CPSC 203, with different guides for different operating systems. A tech stack is the complete set of tools and technologies needed to accomplish a particular task; in this case, it is the various programming and data analytics that we will explore in CPSC 203.
As you go through the install guides, remember that perhaps the two most important things you will learn in this course is how to troubleshoot things and achieve familiarity and proficiency with your computer. Be patient, read things carefully, do not be afraid to try things, it’s unlikely you will do anything to irreversibly break your computer! Almost everything you do (you’re on your own if you decide to take a hammer to your laptop!) can be undone, don’t be afraid to ask your peers, TAs, and the instructor on Giscus below (you will need to set up an GitHub account first).
This is an exciting time for you as you begin your Software Development journey!
Hardware
Before starting, ensure that your laptop meets the minimum requirements:
- Can connect to networks via a wireless connection.
- Has at least 25 GB disk space available.
- Has at least 4 GB of RAM (more is recommended).
- Uses a 64-bit CPU.
- Is at most 6 years old at the start of the course (4 years old or newer is recommended).
- Student user has full administrative access to the computer.
If your computer does not meet any of the requirements above, please don’t just drop the course!! Let me know first and we can discuss alternate possibilities so you can still take the course.
Software
These installation notes assume you are starting with a fresh install, without any custom setups. If you have previously installed Python and any related packages, we strongly recommend uninstalling them. Be sure to remove any user configuration files and back them up if desired. Following the instructions below will help you install and configure the tech stack correctly in the same way for our course, enabling us to support you effectively and minimize setup issues and software conflicts.
In all the sections below, if you are presented with the choice to download either a 64-bit (also called x64) or a 32-bit (also called x86) version of the application always choose the 64-bit version.
In all the sections below, if you are presented with the choice to download either a 64-bit (also called x64) or a 32-bit (also called x86) version of the application always choose the 64-bit version. If you purchased a Mac anytime in the last few years, chances are you have an “M1/M2/M3/M4”… Mac, also known as “Apple Silicon”, and “arm64”. When given the option, you should choose to download the “arm64”/Apple Silicon or the “Universal versions—if that choice doesn’t exist, then you can choose the”x86” version which will run in “emulated mode”, which will result in a slight performance penalty.
Operating system (OS)
We strongly suggest to run the latest version of the operating system (OS) available for your laptop.
If you update or upgrade your OS you do so on your own risk!
In general, there are many good reasons to update your OS. Some of the software tools or their functionality used in our tutorials will only work on more recent OS versions. Updating your OS will also ensure that you have the latest security updates installed and help prevent unauthorized access to your computer.
There a two main reasons that would prevent you from updating your OS:
- Your hardware would not support the updated OS.
- Some of your software you depend on might not work on a newer OS.
The latest version of Windows 11 available is 24H2 (build 26100.4656). See here on how to update your Windows 11 machine to the latest version. If you do not own Windows 11, currently enrolled UBC students with a valid CWL account qualify for one license of Windows 11 Education.
The latest version of macOS is Sequoia 15.5. Check your current version of macOS. If you do not have the latest version, follow the upgrade instructions on the Apple support page.
If you cannot upgrade to the latest version, follow these instructions to find the system requirements and upgrade to latest versions available to you. If you need to maintain 32-bit compatibility for any of your software, then upgrade to no higher than macOS 10.14 Mojave.
Web browser
You are welcome to use most modern browsers that have a WebKit or Gecko backend. Safari (Mac only), Firefox, Vivaldi, Brave, Edge are all recommended. Google Chrome is not recommended because of the well-documented privacy and tracking issues with Google.
Zoom
We will be using Zoom in this course for all the student hours and you should install the Zoom client locally on your machine. It is important that you have the most recent version of Zoom installed, as we will be using many of the features that are only available in more recent versions.
The latest version of Zoom is 6.5.5 (8927). You can ensure you have the latest version of Zoom by clicking “Check for Updates” as shown in the screenshot below.
Please note that if you have been relying on the “web version” of Zoom that works only in a browser, this will not work for this course! Please make sure to download the Zoom desktop client for your operating system to fully participate in the course.
Visual Studio Code
The open-source text editor Visual Studio Code (VS Code) is both a powerful text editor and a full-blown Python IDE (integrated development environment), which we will use for more complex analysis. You can download VS Code from its website. Once the download is finished, double click it to open and follow the installation instructions.
The open-source text editor Visual Studio Code (VS Code) is both a powerful text editor and a full-blown Python IDE (integrated development environment), which we will use for more complex analysis. You can download VS Code from its website. Once the download is finished, click “Open with Archive utility”, and move the extracted VS Code application from “Downloads” to “Applications”.
Make sure you are able to open VS Code by clicking on the application.
VS Code extensions
The real magic of VS Code is in the extensions that let you add languages, debuggers, and tools to your installation to support your specific workflow. We will install some VS Code extensions to help us with our workflows. From within VS Code you can open up the Extension Marketplace (read more here) to browse and install extensions by clicking on the Extensions icon in the Activity Bar indicated in the figure below.
To install an extension, you simply search for it in the search bar, click the extension you want, and then click “Install”. There are extensions available to make almost any workflow or task you are interested in more efficient! Here we are interested in setting up VS Code as a Python IDE. To do this, search for and install the following extensions:
- Python (by Microsoft)
- Python Debugger (by Microsoft)
- autoDocString (by Nils Werner)
- Python Indent (by Kevin Rose)
- Black Formatter (for formatting, linting)
- Markdown Table Formatter (helps format markdown tables)
- Rainbow CSV (for colouring columns in CSV files)
- indent-rainbow (for helping you see indents)
- markdownlint (markdown linting and style checking extension)
Terminal
Unfortunately, one of the major problems with using the Windows operating system is that the “Command Prompt” that comes with the operating system is severely deficient. No worries though, luckily most of the tools we use in this course are open source, so the community has worked hard to shore up deficiencies in the Microsoft ecosystem.
A very common tool found on Unix-like systems (like macOS and Linux distirbutions), is called bash, and the best way to make it available to Widows is to install Linux. Luckily, there is a tool that allows us to run Linux alongside Windows (as something called a virtual machine) called Windows Subsystem for Linux (WSL). To set it up, we first start the Windows Terminal by opening the Windows Start menu, typing “terminal” in search bar and opening it. The Terminal will open in something called PowerShell:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\<user-name>>
Now type the following to install Ubuntu via WSL:
--install wsl
After the install <do we need to start Ubuntu manually?>, you will be prompted to create a username and password for Ubuntu, keep this information in a safe place like a password manager.
If you encounter any problems, reach out on Giscus to us.
Resources:
- Install WSL
- Set up a WSL development environment
- Get started using Git on WSL
- Troubleshooting Windows Subsystem for Linux
The replacement for the Command Prompt we will use in this course is called “Git BASH”. The latest version of Git BASH for Windows is 2.50.1.
“Git BASH” is relatively old software, but it is very reliable and works very well. If you are feeling brave and want to setup zsh
(the next generation shell, with many improvements) on Windows, you can try these instructions here. Note that these instructions are experimental and support from the teaching team is limited. But if you can get it to work or run into any issues, let me know! I hope to adopt zsh on windows fully next time I teach this course.
Briefly, we will be using the Bash shell to interact with our computers via a command line interface, and Git to keep a version history of our files and upload to/download from to GitHub.
Download the windows version of Git BASH, run the installer and accept the default configuration for all pages except for the following:
- On the Choosing the default editor used by Git page, select “Use Visual Studio Code as Git’s default editor” from the drop-down menu.
- Optional: On the Select Components page, check “On the Desktop” under “Additional icons” to create a shortcut for Git BASH on your Desktop.
If you wish to pin Git BASH to the taskbar, you need to search for the program in the start menu, right click the entry and select “Pin to taskbar”. If you instead first launch the program and pin it by right clicking on the taskbar icon, Git BASH will open with the wrong home directory (/
instead of /c/users/$USERNAME
.
After installation, test if you were successful by opening the Git BASH program.
Going forward we will refer Git BASH just as the “terminal” and all commands should be entered there (not Anaconda Command Prompt, Command Prompt or PowerShell, etc.).
In the terminal, type the following to check which version of Bash you just installed:
bash --version
The output should look similar to this:
GNU bash, version 5.3.3(1)-release (x86_64-pc-sys)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
If you tried to paste the above into Git BASH, you will have noticed that Control-VControl-V does not work in Git BASH. Instead you need to right click and select “Paste” or use the Shift-InsertShift-Insert shortcut. To copy from the Git BASH terminal you simply select the text you want and it is copied automatically.
Via right click you can also reach the settings menu where you can configure Git BASH to your preferences, a couple of tips would be to check “Mouse > Clicks place command line cursor” and change the font to something more legible, e.g. Consolas (“Text > Select”).
Launch VS Code from Git BASH
You can launch many windows programs from the Bash terminal, e.g. to launch VS Code that we installed previously, you would type in code
, let’s use this to check the version of vscode that we installed:
code --version
1.71
e4503b30fc78200f846c62cf8091b76ff5547662
x64
Setting VS Code as the default editor
To make programs run from the terminal (such as git
) use VS Code by default, we will modify ~/.bash_profile
. First, open this file using VS Code by typing into the terminal:
code ~/.bash_profile
If you see any existing lines in your ~/.bash_profile
related to a previous Python or R installation, please remove these.
Append the following lines:
# Set the default editor for programs launch from terminal
EDITOR="code --wait"
VISUAL=$EDITOR # Use the same value as for "EDITOR" in the line above
Then save the file and exit VS Code.
Most terminal programs will read the EDITOR
environmental variable when determining which editor to use, but some read VISUAL
, so we’re setting both to the same value.
A terminal app comes preinstalled with macOS. You can find the terminal app in Applications > Utilities > Terminal or by activating Spotlight with Command-SpaceCommand-Space, typing in terminal and then pressing EnterEnter. You will need to do this several times in these instructions.
You can proceed to spice up your terminal a bit!
Oh My Zsh to configure the terminal
Install “Oh My Zsh” to add terminal colours, highlighting and other cool features by running the following command in your terminal:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
You may now customize your terminal with themes (see screenshots of themes here) by following the directions here. Selecting a theme is optional, the default one is pretty good as it is!
Configure VS Code to launch from the terminal
- Launch VS Code
- Open the Command Palette Shift-Command-PShift-Command-P
- Type
shell command
to find the “Shell Command: Install ‘code’ command in PATH” command - Hit EnterEnter
- Restart the terminal for the new
$PATH
value to take effect
Now you can open files in VS Code from the terminal! Alternatively, just type code .
in any folder to start editing files in that folder.
You can test that VS Code is installed and can be opened from terminal by restarting Terminal and typing the following command in a Terminal:
code --version
you should see something like this if you were successful:
1.85.2
8b3775030ed1a69b13e4f4c628c612102e30a681
arm64
If this does not work for you, try it again:
- Restart VS Code.
- Open the Command Palette Shift-Command-PShift-Command-P.
- Type
shell command
to find the “Shell Command: Uninstall ‘code’ command from PATH”. - Hit Enter.
- Type
shell command
to find the “Shell Command: Install ‘code’ command from PATH”. - You might need to enter in your Mac’s admin password.
If this still does not work, then you should ask a TA for help, but if you’re feeling brave, manual install instructions are here - remember to use the zsh
files steps as well.
Setting VS Code as the default editor
To make programs run from the Terminal (such as git
) use VS Code by default, we will modify ~/.z_profile
. First, open it using VS Code:
code ~/.z_profile
If you see any existing lines in your ~/.z_profile
related to a previous Python installation, please remove them.
Append the following lines:
# Set the default editor for programs launch from terminal
EDITOR="code --wait"
VISUAL=$EDITOR # Use the same value as for "EDITOR" in the line above
Then save the file and exit VS Code.
Most terminal programs will read the EDITOR
environmental variable when determining which editor to use, but some read VISUAL
, so we’re setting both to the same value.
Git and GitHub
Git is installed as part of the terminal/Git BASH.
We will be using the command line version of Git. Some of the Git commands we will use are only available since Git 2.23, so if your Git is older than this version, we ask you to update it using the Xcode command line tools (not all of Xcode), which includes Git.
Open your terminal and type the following command to install Xcode command line tools:
xcode-select --install
In the terminal type the following to check the Git version:
git --version
You should see something like this if everything is working correctly:
git version 2.50.1
If you run into trouble, post your error message in the discussion below and ask for help!
GitHub.com account
Sign up for a free account at GitHub.com if you don’t have one already. Your GitHub.com username is important, so here some advice on picking a username and below an image on how to find it again.
Configuring Git user info
Next, we need to configure Git by telling it your name and email. To do this type the following into the terminal (the same ones you used to sign up for GitHub):
git config --global user.name "<your-github-name>"
git config --global user.email "<your-github-email>"
To ensure that you haven’t made a typo in any of the above, you can view your global Git configurations by either opening the configuration file in a text editor (e.g., via the command code ~/.gitconfig
) or by typing git config --list --global
. You can quit this view by just pressing the q
key on your keyboard.
Create your GitHub “Personal Access Token”
This is a bit tricky, so please make sure you follow these directions carefully.
Start creating a personal access token (PAT) on GitHub.com either by
Clicking this link: https://github.com/settings/tokens/new
Navigating to your tokens by following these steps:
- Log in to GitHub.com
- Click your picture in the top right and select “Settings”
- Click on “Developer Settings”
- Click on “Personal access tokens” and then on “Tokens (classic)”
- Click “Generate new token”
Give the token a name in the note field, for example,
CPSC 203
Choose for expiration “Custom” and set the date to the end of this term: 2025-12-05
Set the scope of the token to the “repo” level (see image below):
Personal access token settings Click “Generate new token”
Copy the token that is shown to you. It is essentially a password for apps on your computer (for example, Git) to enable them to take actions on GitHub.com for you (in this case, clone a private repository to your computer). Treat this password like any other of your other passwords, so don’t share your token with anyone.
Save this token somewhere safe on your computer, such as a password manager. You will not be able to come back to this page to get your token. If you forget or lose a token, you can just delete that token on GitHub.com where you manage all existing tokens and create another one: https://github.com/settings/tokens
Clone your first repository on your computer
Open a terminal window, and then run the following command:
git clone https://github.com/firasm/test.git
Hopefully, if things work, you should be able to see a new folder created at that location. We will be talking more about what exactly you did over the next week and a bit, don’t worry!
If after running the code above, you see the error message:
fatal: destination path 'test' already exists and is not an empty directory.
It means that you already attempted a clone before, and there is already a directory called test
where you are trying to clone this repository. You will first need to delete that directory to try again. Open an Explorer (Windows) or Finder (macOS) window on your computer, navigate to the directory, right click the test
directory and delete it. Alternatively, from the command line you can try:
rm -rf test
which will “remove” (using the rm
command) the directory called test
. The-
is to specify additional options: r
means “recursively” for all the files in the directory, and f
means “force” which means don’t ask me for confirmation after deleting each file and folder.
Python
We are now ready to install Python!
Installing conda
and Python
We will be using Python for a large part of the course, and conda
will be our Python package manager. We will be using the Miniconda installer (read more here) to install both Python and conda at the same time. Miniconda also provides us with a minimum number of useful packages so installation is quick, and relatively painless. You can download the Miniconda installer here for your OS.
After the download has finished, run the installer and accept the default configuration on all pages.
Make sure to check the box to add Miniconda to the PATH
. There is a big scary warning that says this is “Not Recommended” ; you can ignore that warning, and make sure that checkbox is clicked!
After the installation is complete, open the Start Menu and search for the program called “Anaconda Prompt (miniconda3)”. When this opens you will see a prompt similar to (base) C:\Users\your_name
. Type the following to check that your Python installation is working:
python --version
which should return something like this:
Python 3.13.6
If instead you see Python 2.7.X
you installed the wrong version. Follow these instructions to delete this installation and try the installation again, selecting Python 3.13.6 (or higher).
Integrating Python with the Git Bash terminal
This part is very important!!!
To avoid having to open the separate Anaconda Prompt every time we want to use Python, we can make it available from the (Git BASH) terminal, which is what we will be using most of the time. To set this up, open the “Anaconda Prompt (miniconda3)” again and type:
conda init bash
You will see that this modified a few configuration files, which makes conda
visible to the terminal. Close all open terminal windows and launch a new one, you should now see that the prompt string has changed to include the word (base)
as in the screenshot below:
If you type
python --version
you should now see the same output as above:
Python 3.13.6
If you want to run Python interactively from the Git BASH terminal, you need to prepend the winpty
command, so the full command would be winpty python
(if you run this, note that you can exit the Python prompt by typing exit()
). Running just python
works on other setups, but will freeze the Git BASH terminal.
Let’s check the version of the conda
package manager. If you type
conda --version
you should see something like this
conda 25.5.1
Optional One annoyance with our current terminal setup is that the word (base)
is not on the same row as the rest of the prompt string (the part with your_name@your_computer
). To fix this we can edit the .bash_profile
configuration file to indicate that we do not want a newline at the beginning of the prompt string. Open up the configuration file using VS Code by typing the following command into a terminal:
code "/c/Program Files/Git/etc/profile.d/git-prompt.sh"
Delete the line that reads the following (it should be line 13):
PS1="$PS1"'\n' # new line
Click to save the file, when VS Code prompts you that the saving failed, click “Retry as Admin” and then “Yes”. That’s it! Now if you launch a new terminal instance, you will see (base)
on the same line as the rest of the prompt string as in the screenshot below.
After installation, restart the terminal. If the installation was successful, you will see (base)
prepending to your prompt string.
Let’s check the version of the conda
package manager. If you type
conda --version
you should see something like this
conda 25.5.1
Note: If you see zsh: command not found: conda
, try the following>: Open a new Terminal (it should be zsh), then type: source /Users/YOURUSERNAME/miniconda3/bin/activate
OR source ~/miniconda3/bin/activate
depending on whether you installed for all users, or just your user (make sure to also change YOURUSERNAME to your username). Then enter the following command conda init zsh
. The error should now be fixed.
Next, type the following to ask for the version of Python:
python --version
which should return something like this:
Python 3.13.6
If instead you see Python 2.7.X
you installed the wrong version. Follow these instructions to delete this installation and try the installation again, selecting Python 3.13.6 (or higher).
Essential Python packages
conda
installs Python packages from different online repositories which are called “channels”. A package needs to go through thorough testing before it is included in the default channel, which is good for stability, but also means that new versions will be delayed and fewer packages are available overall. There is a community-driven effort called the conda-forge
(read more here), which provides more up-to-date packages. To enable us to access the most recent versions of the Python packages we are going to use, we will add this channel. To add the conda-forge
channel type the following in a terminal window:
conda config --add channels conda-forge
To install packages individually, we need to use the following command: conda install -c conda-forge "<package-name>"
. The part about conda install
tells the conda
package manager to install a particular package, and the -c
part is an extra “option” that tells conda
to look in the conda-forge
channel (which usually has the latest updated packages). We are specifying that we should use the conda-forge
source because it typically has more recent and updated package versions.
Let’s install the key packages needed (you will note that we’re also specifying certain versions of the package with = X.Y
). You should copy and paste each line below in your terminal to install the following packages:
conda install -c conda-forge "black"
conda install -c conda-forge "pandas"
conda install -c conda-forge "seaborn"
conda install -c conda-forge "pre-commit"
conda
will show you the packages that will be downloaded, and you may need to press enter
or Y
(for yes) to proceed with the installation. This may take a while to complete.
We will be installing more Python packages as we go through the course!
tree
From the tree for Windows page, “tree
is a recursive directory listing program that produces a depth indented listing of files.” This is very useful to explore your directory and file structure to figure out which files are where.
Unfortunately, tree
is not trivial to install on Windows, but it is definitely worth the 2–3 minutes it takes to install it. The steps in detail are outlined here (with screenshots).
In brief, the steps are:
Download the
tree
binariesUnzip the file, and navigate to the
bin
directory, and findtree.exe
.Move or copy the
tree.exe
file to this location:C:\Program Files\Git\usr\bin
.Restart Git BASH and type in
tree
.
If things work, then you’re all done!
“tree
is a recursive directory listing program that produces a depth indented listing of files.” This is very useful to explore your directory and file structure to figure out which files are where.
You can install the tree
package using this command:
conda install -c conda-forge tree
After this, you’re all done!
Attribution
These instructions have been adapted and remixed from the original version provided by the UBC-Vancouver MDS Install stack under a CC-BY-SA 4.0 license. They were originally written by Anmol Jawandha but have since been updated by Stephan Koenig, Firas Moosvi, Joel Ostblom, Tomas Beuzen, Rodolfo Lourenzutti, Tiffany Timbers, and others.