Skip to the content.

Bash shell

You already have it! Depending on which version of Linux you’re running you may need to type bash inside the terminal to access it. To check whether this is necessary, follow these steps:

  1. Open a terminal and type echo $SHELL.
    • If it reads /bin/bash then you are all set!
    • If not, whenever the instructions read open a terminal, please assume you are to open a terminal, type bash, and the proceed with the instructions as specified.

Git

You may already have it; try typing sudo apt-get install git (Ubuntu, Debian) or sudo dnf install git (Fedora) inside the terminal. If you are prompted to install it follow the instructions on-screen to do so.

Git configuration

In case you have never used Git on your computer, you may have to configure it.

Type the following commands, and make sure to use the name and email associated with your GitHub account.

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

Tip: You can review your configuration at any time with: git config --list

Create a personal access token (PAT) for GitHub

To authenticate to GitHub from the command line, you will use a PAT instead of your GitHub account password. In this course, when using a git command that prompts you for your password, you will enter this token.

Log in to your GitHub account, and follow these instructions to create a fine-grained PAT.

Use an informative name for the token, such as QLSC612_PAT.

Then, click Generate token, and copy and store the resulting token value in a secure location.

To use git/GitHub for your own purposes after this course, you can use the GitHub CLI or Git Credential manager instead of creating a PAT.

For more info, see:

VSCode

  1. Go to this page and click the download button for either the .deb (Ubuntu, Debian) or the .rpm (Fedora, CentOS) file.
  2. Double-click the downloaded file to install VSCode (you may be prompted to type your administrator password during the install).

VSCode extensions

  1. Open the Visual Studio Code application.
  2. Open the Extension side panel by pressing Ctrl+Shift+X. In the search bar at the top of this panel search for each of the following extensions and press Install for the first entry that appears.
Required extensions
  • Python Extension Pack (note that you will need to reload VSCode after installing this)
  • Live Share (Note you may need to press "Ctrl/Cmd+Shift+P" and type "install extensions" again after installing this)
  • Docker
  • WSL
Recommended extensions

Python

  1. Open a new terminal and type the following lines (separately) into the terminal, pressing Enter after each one:

    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    bash Miniconda3-latest-Linux-x86_64.sh
    
  2. A license agreement will be displayed and the bottom of the terminal will read --More--. Press Enter or the space bar until you are prompted with “Do you accept the license terms? [yes|no].” Type yes and then press Enter
  3. The installation script will inform you that it is going to install into a default directory (e.g., /home/$USER/miniconda3). Leave this default and press Enter.
  4. When you are asked “Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no],” type yes and press Enter. Exit the terminal once the installation has finished.
  5. Re-open a new terminal. Type which python into the terminal and it should return a path (e.g., /home/$USER/miniconda3/bin/python).
    • If you do not see a path like this then please try typing conda init, closing your terminal, and repeating this step. If your issue is still not resolved skip the following step and contact an instructor on the #help-installation channel of the Slack workspace.
  6. Type the following to remove the installation script that was downloaded:

    rm ./Miniconda3-latest-Linux-x86_64.sh
    

Python packages

Open a terminal and type the following commands (press Enter after each):

conda config --append channels conda-forge
conda config --set channel_priority strict
conda create -n qlsc612 -y python=3.12 flake8 jupyterlab nilearn matplotlib seaborn bokeh statsmodels plotly wordcloud
conda activate qlsc612

This installation step (conda create) will take a couple minutes. The above commands create a new conda Python environment named qlsc612 with all the necessary packages installed for this course. The last line, conda activate qlsc612, will activate this Python environment (the default environment is base).

Docker

  1. You will be following different instructions depending on your distro (Ubuntu, Debian, Fedora, CentOS). Make sure to follow the “Install using the repository” method!
  2. Once you’ve installed Docker make sure to follow the post-install instructions as well. You only need to do the “Manage Docker as a non-root user” and “Configure Docker to start on boot” steps.
  3. Open a new terminal and type docker run hello-world. A brief introductory message should be printed to the screen.