Setup for the course#
There are a few things you need to get working on your machine in order to follow this course. However, don’t worry as it’s all gonna be open source, won’t require a lot of storage and will be explained in detail.
While same parts and section will be do-able via cloud computing
, which is nice and easy to follow in an interactive manner, it’s not recommended as getting Python
& friends to work reliably on your machine is going to be very beneficial. This holds true for the course and especially beyond. Via installing these tools, you will be equipped to basically continue right away and start using them in your everyday research workflow. This even applies if you won’t continue with python
(I certainly hope you do.) and instead work with R
(of course also cool), matlab
(weeeeeeeell…) or what have you. Having that in mind and integrating other tools/resources focusing open and reproducible (neuro-/data) science, you will find a rather comprehensive set of install instructions below. While not all of them might be totally necessary for the course, they all will help you a great deal going further and are especially useful/needed if we have to hold the course virtually due to the COVID-19 pandemic.
Don’t worry, you got this!
https://media1.tenor.com/images/f72cb542d6b3e3c3421889e0a3d9628d/tenor.gif?itemid=4533805
General things#
There are a few computing requirements for the course that are absolutely necessary (beyond the few software packages you should install, described below):
You must have administrator access to your computer (i.e., you must be able to install things yourself without requesting IT approval).
You must have at least 20 GB of free disk space on your computer (but we would recommend more, to be safe).
If you are using Windows you must be using Windows 10; Windows 7 and 8 will not be sufficient for this course.
If you foresee any of these being a problem please reach out to one of the instructors for what steps you can take to ensure you are ready for the course start.
Required software#
To get the most out of the course, we ask that you arrive with the following software already installed:
A command-line shell:
Bash
A remote-capable text editor: VSCode
A literature & reference manager: Zotero
Python 3
viaMiniconda
A GitHub account
If you already have all of the above software tools/packages installed, or are confident you’ll be able to install them by the time the course starts, you can jump straight to checking your install.
The rest of this page provides more detail on installation procedures for each of the above elements, with separate instructions for each of the three major operating systems (Windows
, Mac OS
, and Linux
).
Some quick general notes on instructions#
There is no difference between
Enter
andReturn
in these instructions, so just press whatever the equivalent on your keyboard is whenever one is statedIf you already have some of these things installed on your computer already that should (theoretically) be okay. However, you need to make sure that you are able to complete the steps described in checking your install without issue.
For example, having multiple different
Python
installations on your computer can lead to incredibly frustrating issues that are very difficult to debug. As such, if you have already installedPython
via some other application (notMiniconda
/Anaconda
), it’s strongly encouraged to uninstall it before following the instructions below. You must havePython
installed viaMiniconda
for this course.
OS-specific installation instructions#
Select the tab that corresponds to your operating system and follow the instructions therein.
You can, of course, skip sections of tools you have already installed/set up. However, please make sure to run our little installation test script
outlined at the end of this section and in case, something doesn’t work out install the respective tool(s) as outlined here.
Windows Subsystem for Linux (WSL)
Search for
Windows Powershell
in your applications; right click and selectRun as administrator
. SelectYes
on the prompt that appears asking if you want to allow the app to make changes to your device.Type the following into the Powershell and then press
Enter
:Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Press
Enter
again when prompted to reboot your computer.Once your computer has rebooted, open the Microsoft Store and search for “Ubuntu.” Install the program labelled “Ubuntu 18.04” (not “Ubuntu 16.04” or “Ubuntu”) by clicking the tile, pressing
Get
, and thenInstall
.Search for and open Ubuntu from your applications. There will be a slight delay (of a few minutes) while it finishes installing.
You will be prompted to
Enter new UNIX username
. You can use any combination of alphanumeric characters here for your username, but a good choice is<first_initial><last_name>
(e.g.,jsmith
for John Smith). You will then be prompted to enter a new password. (Choose something easy to remember as you will find yourself using it frequently.)Right click on the top bar of the Ubuntu application and select “Properties”. Under the “Options” tab, under the “Edit Options” heading, make sure the box reading “Use Ctrl+Shift+C/V as Copy/Paste” is checked. Under the “Terminal” tab, under the “Cursor Shape” heading, make sure the box reading “Vertical Bar” is checked. Press “Okay” to save these settings and then exit the application.
(The above step-by-step WSL instructions are distilled from here and here. If you have questions during the installation procedure those resources may have answers!)
From this point on whenever the instructions specify to “open a terminal” please assume you are supposed to open the Ubuntu application.
Bash shell
You already have it, now that you’ve installed the WSL!
Git
You already have it, now that you’ve installed the WSL!
DataLad
Please follow the fantastic install instructions of the DataLad handbook
. However, here’s what worked for us in short:
At first, we need to get NeuroDebian in order to install the fitting version of DataLad, i.e. 0.14
. Thus, please select your respective OS, here Ubuntu 18.04
and a download server
, e.g. Germany (G-Node, LMU Munich)
. Then, simply follow the resulting instructions, starting with adding the NeuroDebian
repository
:
wget -O- http://neuro.debian.net/lists/bionic.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xA5D32F012649A5A9
and then updating the package index:
sudo apt-get update
Now you should be able to install DataLad
via:
sudo apt-get install datalad
VSCode
Go to https://code.visualstudio.com/ and click the download button, then run the
.exe
file.Leave all the defaults during the installation with the following exception:
Please make sure the box labelled “Register Code as an editor for supported file types” is selected
VSCode extensions
Open the Ubuntu application.
Type
code .
into the terminal and pressEnter
. You should see a message reading “Installing VS Code Server” and then a new windows will open up.Press
Ctrl+Shift+P
in the new window that opens and type “Extensions: Install extensions” into the search bar that appears at the top of the screen. Select the appropriate entry from the dropdown menu that appears (there should be four entries; simply select the one that reads “Extensions: Install extensions”).A new panel should appear on the left-hand side of the screen with a search bar. Search for each of the following extensions and press
Install
for the first entry that appears. (The author listed for all of these extensions should be “Microsoft”.)Python (n.b., you will need to reload VSCode after installing this)
Live Share (n.b., you may need to press “Ctrl/Cmd+Shift+P” and type “install extensions” again after installing this)
Live Share Extension Pack
Docker
Remote - WSL
Zotero
Go to https://www.zotero.org/ and click the “Log in” button followed by the “Register for a free account” button on the subsequent page.
Register for a free account via providing the necessary information. N.B.: Think about the email address you are using for the registration. While it might seem feasible/appropriate to use your university account, please remember that you won’t have access to it anymore after you finished your studies. Obviously, you could just change it when the time comes but you could also just use a different one right away (which might be less prone to problems anyway).
Download the Zotero Desktop App for windows from the Download page, run the downloaded
.exe
file and follow the instructions on your screen.Open the
Zotero Desktop App
, go toZotero
->Preferences
->Sync
and log in with your user credentials.
Python
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
A license agreement will be displayed and the bottom of the terminal will read
--More--
. PressEnter
or the space bar until you are prompted with “Do you accept the license terms? [yes|no].” Typeyes
and then pressEnter
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 pressEnter
.When you are asked “Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no],” type
yes
and pressEnter
. Exit the terminal once the installation has finished.Re-open the Ubuntu application. 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 on the BHS Slack.
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:
conda config --append channels conda-forge
conda config --set channel_priority strict
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:
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, typebash
, 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 yum install git
(Fedora) inside the terminal.
If you are prompted to install it follow the instructions on-screen to do so.
DataLad
Please follow the fantastic install instructions of the DataLad handbook
. However, here’s what worked for us in short:
At first, we need to get NeuroDebian in order to install the fitting version of DataLad, i.e. ~0.14
. Thus, please select your respective OS, here Ubuntu 18.04
and a download server
, e.g. Germany (G-Node, LMU Munich)
. Then, simply follow the resulting instructions, starting with adding the NeuroDebian
repository
:
wget -O- http://neuro.debian.net/lists/bionic.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xA5D32F012649A5A9Hi
and then updating the package index:
sudo apt-get update
Now you should be able to install DataLad
via:
sudo apt-get install datalad
VSCode
Go to https://code.visualstudio.com/ and click the download button for either the .deb (Ubuntu, Debian) or the .rpm (Fedora, CentOS) file.
Double-click the downloaded file to install VSCode. (You may be prompted to type your administrator password during the install).
VSCode extensions
Open the Visual Studio Code application.
Press
Ctrl+Shift+P
in the new window that opens and type “Extensions: Install extensions” into the search bar that appears at the top of the screen. Select the appropriate entry from the dropdown menu that appears (there should be four entries; simply select the one that reads “Extensions: Install extensions”).A new panel should appear on the left-hand side of the screen with a search bar. Search for each of the following extensions and press
Install
for the first entry that appears. (The author listed for all of these extensions should be “Microsoft”.)Python (n.b., you will need to reload VSCode after installing this)
Live Share (n.b., you may need to press “Ctrl/Cmd+Shift+P” and type “install extensions” again after installing this)
Live Share Extension Pack
Docker
Zotero
Go to https://www.zotero.org/ and click the “Log in” button followed by the “Register for a free account” button on the subsequent page.
Register for a free account via providing the necessary information. N.B.: Think about the email address you are using for the registration. While it might seem feasible/appropriate to use your university account, please remember that you won’t have access to it anymore after you finished your studies. Obviously, you could just change it when the time comes but you could also just use a different one right away (which might be less prone to problems anyway).
Download the Zotero Desktop App for linux from the Download page, run the downloaded file and follow the instructions on your screen.
Open the
Zotero Desktop App
, go toZotero
->Preferences
->Sync
and log in with your user credentials.
Python
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
A license agreement will be displayed and the bottom of the terminal will read
--More--
. PressEnter
or the space bar until you are prompted with “Do you accept the license terms? [yes|no].” Typeyes
and then pressEnter
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 pressEnter
.When you are asked “Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no],” type
yes
and pressEnter
. Exit the terminal once the installation has finished.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 BHS Slack.
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:
conda config --append channels conda-forge
conda config --set channel_priority strict
Bash shell
You already have it!
Depending on which version of Mac OS you’re running you may need to type bash
inside the terminal to access it.
To check whether this is necessary, follow these steps:
Open a terminal and type
echo $SHELL
. If it reads/bin/bash
then you are all set!
Note: If you are using Mac Catalina (10.15.X) then it is possible your default shell is NOT CORRECT.
To set the default to bash, type chsh -s /bin/bash
in the terminal, enter your password when prompted, and then close + re-open the terminal.
Git
You may already have it!
Try opening a terminal and typing git --version
.
If you do not see something like “git version X.XX.X” printed out, then follow these steps:
Follow this link to automatically download an installer.
Double click the downloaded file (
git-2.23.0-intel-universal-mavericks.dmg
) and then double click thegit-2.23.0-intel-universal-mavericks.pkg
icon inside the dmg that is opened.Follow the on-screen instructions to install the package.
DataLad
Please follow the fantastic install instructions of the DataLad handbook
.
VSCode
Go to https://code.visualstudio.com/ and click the download button.
Unzip the downloaded file (e.g.,
VSCode-darwin-stable.zip
) and moving the resultingVisual Studio Code
file to your Applications directory.
VSCode extensions
Open the Visual Studio Code application
Type
Cmd+Shift+P
and then enter “Shell command: Install ‘code’ command in PATH” into the search bar that appears at the top of the screen. Select the highlighted entry. A notification box should appear in the bottom-right corner indicating that the command was installed successfully.Type
Cmd+Shift+P
again and then enter “Extensions: Install extensions” into the search bar. Select the appropriate entry from the dropdown menu that appears (there should be four entries; simply select the one that reads “Extensions: Install extensions”).A new panel should appear on the left-hand side of the screen with a search bar. Search for each of the following extensions and press
Install
for the first entry that appears. (The author listed for all of these extensions should be “Microsoft”.)Python (n.b., you will need to reload VSCode after installing this)
Live Share (n.b., you may need to press “Ctrl/Cmd+Shift+P” and type “install extensions” again after installing this)
Live Share Extension Pack
Docker
Zotero
Go to https://www.zotero.org/ and click the “Log in” button followed by the “Register for a free account” button on the subsequent page.
Register for a free account via providing the necessary information. N.B.: Think about the email address you are using for the registration. While it might seem feasible/appropriate to use your university account, please remember that you won’t have access to it anymore after you finished your studies. Obviously, you could just change it when the time comes but you could also just use a different one right away (which might be less prone to problems anyway).
Download the Zotero Desktop App for macOS from the Download page, run the downloaded file and follow the instructions on your screen.
Open the
Zotero Desktop App
, go toZotero
->Preferences
->Sync
and log in with your user credentials.
Python
Open a new terminal and type the following lines (separately) into the terminal, pressing
Enter
after each one:curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh bash Miniconda3-latest-MacOSX-x86_64.sh
A license agreement will be displayed and the bottom of the terminal will read
--More--
. PressEnter
or the space bar until you are prompted with “Do you accept the license terms? [yes|no].” Typeyes
and then pressEnter
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 pressEnter
.When you are asked “Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no],” type
yes
and pressEnter
. Exit the terminal once the installation has finished.Re-open a 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 BHS Slack.
Type the following to remove the installation script that was downloaded:
rm ./Miniconda3-latest-MacOSX-x86_64.sh
Python packages
Open a terminal and type the following commands:
conda config --append channels conda-forge
conda config --set channel_priority strict
Note: If the instructions aren’t working and you have spent more than 15-20 minutes troubleshooting on your own, reach out on the #help-installation channel on the Discord channel with the exact problems you’re having.
One of the instructors will try and get back to you quickly to help resolve the situation.
If they’re unable to help via Discord
, you may be directed to attend one of the installation office hours.
GitHub account#
Go to join/ and follow the on-screen instructions to create an account. It is a good idea to associate this with your university e-mail (if you have one) as this will entitle you to sign up for the GitHub Student Developer Pack which comes with some nice free bonuses.
Discord#
Go to https://discord.com/ and download and install Discord. Please note, that you can also use Discord through your browser if you don’t want to download it. You will be invited to the course channel via e-mail.
Modern web browser#
Please install Chrome or Firefox. (Safari might also work.) Microsoft Edge is not modern, despite what Microsoft might try and otherwise tell you.
Integrations
A few of the tools you installed additionally nicely integrate with one another. It’s of course up to you to make use of that but it’s definitely recommended as it will ease up your (research/work/study) life quite a bit.
Go to https://www.zotero.org/download/ and install the connector for your respective browser. With that you can directly get
articles
,books
,blog posts
, etc. and theirmeta-data
from the web and added to yourzotero
library. Please note: theZotero Desktop App
needs to be open for this to work.Make sure the
connector
also added theZotero plug in
togoogle docs
, which should look like the following. Please note: theZotero Desktop App
needs to be open for the plug in to work.
Other cool/interesting things
A Google Chrome Extension targeting citation transparency focusing gender imbalance. Going further, your
Zotero library
can also be used to create a diversity statement which can be added to your written submissions. Find out more about it on Dani Bassett’s lab website.Grammarly: an AI powered cloud-based writing assistant that can help with typos, spelling, grammar, punctuation, clarity, engagement, and delivery mistakes. The basic version is free and integrates nicely with browsers and local apps.
GitKraken Glo Boards: create and track tasks for better project management.
Get a pomodoro app that helps you to stay focus, track your work and get things done. For some examples check this list.
Checking your install#
Now that you’ve installed everything it’s time to check that everything works as expected! Type the following into your terminal:
bash <( curl -s https://raw.githubusercontent.com/spark-csd/course_name/main/check_install.sh)
If you installed everything correctly you should see a message informing you as such. If any problems were detected you should receive some brief instructions on what is wrong with potential suggestions on how to remedy it. If you followed these instructions step-by-step and cannot resolve the issue please contact one of the course instructors for more help.
Yeah, you did! Great job!
https://media1.tenor.com/images/d5ebabf248130ec3842ed3b8627fd4f2/tenor.gif?itemid=4770158
Getting the course content#
Now that you have installed the required software (or not) to follow the course, it’s time to gather the respective materials.
Enter the matrix#
Once you reached this point, you should be ready the enter the matrix and follow the course in your preferred way. Congrats, fantastic work!
https://media1.tenor.com/images/e5c21d98f56c4af119b4e14b6a9df893/tenor.gif?itemid=4011236