Installing Python and VSCode

 

To follow this course you need:

  1. A Python enviroment (we will use Anaconda)

  2. A git enviroment

  3. A text editor (we will use VSCode, alternatives are Sublime, Atom, and PyCharm)


A step-by-step guide is provided below.

 

Step 1: Anaconda


Note: The installation might fail if your computer username contains a space or special characters (æ, ø, å, ê, â, î, ô, û, ä, ö, ë, ï, ü, ÿ etc.). The easiest solution is to change your username (otherwise you need to install Anaconda on a path not containing your user name).

Step 1a: Main

  1. Download Anaconda Individual Edition Python 3.9 from https://www.anaconda.com/products/individual

  2. Run the installer (default settings are fine)

 

Step 1b: JupyterLab extensions

Open the program Anaconda Prompt (Windows) or Terminal (Mac). Paste in following commands and hit Enter one by one:

  1. conda update --all

  2. conda install -c conda-forge nodejs

  3. conda install -c conda-forge ipympl

  4. conda install -c conda-forge ipywidgets

 

Step 2: Git and JupyterLab Git extension

 

Git

  1. Go to GitHub.com and sign up

  2. Download git from https://git-scm.com/

  3. Run installer with all the custom settings

 

JupyterLab Git extension

Open the program Anaconda Prompt (Windows) or Terminal (Mac) (close and open it again if already open) and paste in:

  • conda install -c conda-forge jupyterlab jupyterlab-git

 

Step 3: Variable inspector for JupyterLab

 

Open the program Anaconda Prompt (Windows) or Terminal (Mac) and paste in

  • pip install lckr-jupyterlab-variableinspector

  • If you get an error message, try the following command instead

    • conda install -c conda-forge jupyterlab-variableinspector

 

Step 4: VSCode

 

  1. Download VSCode from https://code.visualstudio.com/

  2. Run the installer (default settings are fine)

  3. Open VSCode

  4. Press Ctrl+Shift+P

  5. Paste in Extensions: Install Extensions and hit Enter

  6. In the left panel: Search for and install the following extension (if not already installed):

  7. Press Ctrl+Shift+P again

  8. Paste in Python: Select Interpreter and choose the option where "anaconda3" is part of the path.

  9. If on Windows: Ctrl+Shift+P + paste in Terminal: Select Default Shell hit and choose Command Prompt

 

Next guide


Running Python in JupyterLab