Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:services:application_services:jupyter:start [2023/03/30 16:05] – [Installation of additional packages and environments via Conda] bwegman1en:services:application_services:jupyter:start [2023/03/30 16:22] – [Notebook fails to start after package installation or kernel connection failure] bwegman1
Line 71: Line 71:
 mv -v .local/ .local.gwdg-disable mv -v .local/ .local.gwdg-disable
 </code> </code>
 +
 <WRAP tip> <WRAP tip>
 **mamba** is an alternative implementation of the **conda** package manager. They are interchangeable, it's use is recommended. **mamba** is an alternative implementation of the **conda** package manager. They are interchangeable, it's use is recommended.
 +https://github.com/mamba-org/mamba
 </WRAP> </WRAP>
  
Line 90: Line 92:
 Creating and activating the environment: Creating and activating the environment:
 <code bash> <code bash>
-conda create -y --prefix ./wikidoku +mamba create -y --prefix ./wikidoku 
-conda activate ./wikidoku+mamba activate ./wikidoku
 </code> </code>
  
 As an example the package ''jinja2'' will be installed next. This is the step to install the desired software packages from various Conda channels. As an example the package ''jinja2'' will be installed next. This is the step to install the desired software packages from various Conda channels.
 <code bash> <code bash>
-conda install -y jinja2+mamba install -y jinja2
 </code> </code>
  
Line 103: Line 105:
 python3 -m ipykernel install --user --name wikidoku --display-name "Python (wikidoku)" python3 -m ipykernel install --user --name wikidoku --display-name "Python (wikidoku)"
 jupyter kernelspec list jupyter kernelspec list
-conda deactivate+mamba deactivate
 </code> </code>
  
Line 119: Line 121:
 Via ''New ->'' a new notebook with the new environment can be started. In existing notebooks the kernel can be changed after starting the notebook and selecting ''Kernel -> Change Kernel''. Via ''New ->'' a new notebook with the new environment can be started. In existing notebooks the kernel can be changed after starting the notebook and selecting ''Kernel -> Change Kernel''.
  
-=== Installing additional kernels in an Conda environment ===+=== Installing additional kernels in an Conda/Mamba environment ===
  
 Installing a new, independent Python kernel für the current environment is possible. As an example an older Python 2.7 kernel will be installed next. Installing a new, independent Python kernel für the current environment is possible. As an example an older Python 2.7 kernel will be installed next.
Line 126: Line 128:
 Next follows the installation of the kernel, the ''jupyter'' module for that kernel and finally the kernel is made available for selection in the kernel list. Next follows the installation of the kernel, the ''jupyter'' module for that kernel and finally the kernel is made available for selection in the kernel list.
 <code bash> <code bash>
-conda install -y python=2.7+mamba install -y python=2.7
 python3 -m pip install jupyter python3 -m pip install jupyter
 python3 -m ipykernel install --user --name oldpython --display-name "Python 2.7 (oldpython)" python3 -m ipykernel install --user --name oldpython --display-name "Python 2.7 (oldpython)"