Windows Install Instructions¶

Important

This guide has been adapted from the UBC-Vancouver MDS Install stack under a CC-BY-SA 4.0 license.

These instructions will walk you through installing the required software stack for this course. Before starting, ensure that your laptop meets the following requirements:

  • runs one of the following operating systems: macOS 11.x, Windows 10, and Ubuntu 20.04.

  • can connect to networks via a wireless connection

  • has at least 50 GB disk space available

  • has at least 8 GB of RAM

  • uses English as the default language (if you want TAs or the instructor to help you)

  • student user has full administrative access to the computer

Students’ whose laptops do not meet the requirements specified above will not be able to receive technical assistance from the course team in troubleshooting installation issues.

UBC Student Email¶

Please sign up for a UBC Student Email. This account will also grant you access to a range of UBC services, including Microsoft Teams and OneDrive. To do so navigate to https://it.ubc.ca/services/email-voice-internet/ubc-student-email-service and follow the instructions under “Get Started”.

Install Microsoft Office (Optiona!)¶

UBC students have free access to a Microsoft Office 365 annual subscription, which is renewed for students enrolled in at least one course. Office 365 includes Word, Excel, PowerPoint, Outlook, and OneNote, and is available on a variety of platforms, including Windows, Mac, and Linux/Android.

To get your free Office 365 license and download the installer files, visit [UBC IT] (https://it.ubc.ca/services/desktop-print-services/software-licensing/office-365-students) and click Download Office 365. Note that you will need your CWL login credentials in order to download the software and activate your license.

Geany¶

Geany is a powerful, stable and lightweight programmer’s text editor that provides tons of useful features without bogging down your workflow. It runs on Linux, Windows and MacOS.

Download the latest stable release from here according to your meat consumption.

We will be using Geany initially for this course.

Visual Studio Code¶

The open-source text editor Visual Studio Code (VS Code) is both a powerful text editor and a full-blown Integrated Development Environment (IDE). Go to https://code.visualstudio.com/download and download the windows version of VS Code. After the download has finished, run the installer and accept the default configuration for all pages except for the following:

  • Also on the Select Additional Tasks page check all four boxes under “Other”

    • “Add ‘Open with Code’ action to Windows file context menu”

    • “Add ‘Open with Code’ action to Windows directory context menu”

    • “Register Code as an editor for supported file types”

    • “Add to PATH” (this should be selected by default).

  • Optional On the Select Additional Tasks page, check “Create a desktop icon” under “Additional icons”.

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. From within VS Code you can open up the Extension Marketplace 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! To do this, search for and install the following extensions:

  • Java Extension Pack (0.12.1) by Microsoft

  • Processing Language (1.4.5) by Tobiah Zarlez

  • markdownlint (markdown linting and style checking extension)

  • GitLens - Git supercharged (powerful extension that extends VS Code’s native git capabilities)

  • (Optional) Bracket Pair Colorizer 2 (add colour to help distinguish your brackets: (), [], {})

GitHub.com¶

In MDS we will use the publicly available GitHub.com. Please follow the set-up instructions for both below.

Sign up for a free account at GitHub.com if you don’t have one already.

Configure Git on your computer¶

Although Git and Bash are two separate programs, we are including them in the same section here since they are packaged together in the same installer on Windows. 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. We will be using the command line version of Git as well as Git through RStudio and JupyterLab. Some of the Git commands we will use are only available since Git 2.23, so if you’re Git is older than this version, we ask you to update it.

Go to https://git-scm.com/download/win and download the windows version of git. After the download has finished, run the installer and accept the default configuration for all pages except for the following:

  • Optional On the Select Components page, check “On the Desktop” under “Additional icons”.

  • 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’

Note 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. Below is a picture of the Git Bash icon on the Desktop and an opened instance of the Git Bash terminal (we will often refer to this as just “the terminal”):

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 4.4.23(1)-release (x86_64-pc-sys)
Copyright (C) 2019 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 the Git Bash terminal, you will have noticed that Ctrl+V does not work in Git Bash. Instead you need to right click and select “Paste” or use the Shift+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”).

Let’s also check which version of git was installed:

git --version
git version 2.28.0.windows.1

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.47.3
91899dcef7b8110878ea59626991a18c8a6a1b3e
x64

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 (replacing Jane Doe and janedoe@example.com, with your name and email (the same used to sign up for GitHub), respectively):

git config --global user.name "Jane Doe"
git config --global user.email janedoe@example.com

Note: 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.

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 it using VS Code:

code ~/.bash_profile

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.

Post-installation notes¶

You have completed the installation instructions, well done 🙌! Remember to add a screenshot as instructed in your lab!