bwVisu

Jupyter User Guide

Table of contents

  1. How to add python packages to Jupyter
    1. Via virtual environments
    2. Via miniconda
  2. How to update the python version
  3. How to access your sds storage

How to add python packages to Jupyter

Via virtual environments

  1. Open a terminal and type:
    python3 -m venv <myEnv>
    
  2. Activate your environment:
    source <myEnv>/bin/activate
    
  3. Install your packages:
    pip install -U pip
    pip install <mypackage>
    
  4. Install the ipykernel package:
    pip install ipykernel
    
  5. Register your virtual environment as custom kernel to Jupyter:
    python3 -m ipykernel install --user --name=<myKernel>
    

Via miniconda

  1. Load the miniconda module by clicking first on the blue hexagon icon on the left-hand side of Jupyter's start page and then on the "load" Button right of the entry for miniconda in the software module menu: Screenshot at 2022-02-10 13-47-37 :warning: Note: Currently there is a bug preventing the miniconda module to be shown under the "Lodaded Modules" list after loading it. It will be activated anyway, you can check this by opening a terminal and typing module list.
  2. Open a terminal and type:
    conda create --name <myenv>
    
  3. Activate your environment:
    conda activate <myenv>
    
  4. Install your packages:
    conda install <mypackage>
    
  5. Install the ipykernel package:
    conda install ipykernel
    
  6. Register your virtual environment as custom kernel to Jupyter:
    python3 -m ipykernel install --user --name=<myKernel>
    

How to update the python version

  1. Activate the Miniconda module as shown in the previous section.
  2. Create a virtual environment with a custom python version via conda:
    conda create --name <myenv> python=<python version>
    
  3. Install the ipykernel package:
    conda install ipykernel
    
  4. Register your virtual environment as custom kernel to Jupyter:
    python3 -m ipykernel install --user --name=<myKernel>
    
  5. Select your newly created kernel in Jupyter

How to access your sds storage

  1. Make sure you have an active kerberos ticket: Open a terminal in either Jupyter (press Crtl-Shift-L and select "Terminal") or - if you have a bwForCluster MLS&WISO user account - on the bwForCluster, type

    kinit hd_<your university id>
    

    and enter your password.

    Note: This step is only required if your ticket is about to expire.

  2. Access your data on sds under /mnt/sds-hd.