Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:services:application_services:jupyter:start [2019/10/07 15:24]
bwegman1 [Notebook fails to start after package installation or update, error 500]
en:services:application_services:jupyter:start [2019/12/11 08:50]
bbrauns [Notebook fails to start after package installation or update, error 500]
Line 58: Line 58:
 mv -v .local/ .local.gwdg-disable mv -v .local/ .local.gwdg-disable
 </​code>​ </​code>​
-This deactivates all additionally installed packages. The notebook should start again normally.+Afterwards the notebook server should be restarted. In the upper right corner click on "​Control Panel" - "Stop My Server"​ -> "My Server"​. ​This deactivates all additionally installed packages. The notebook should start again normally.
  
 ==== Installation of additional packages and environments via Conda ==== ==== Installation of additional packages and environments via Conda ====
Line 79: Line 79:
 </​code>​ </​code>​
  
-Next the new environment will be registered with the notebook. Terms for ''​--name'' ​and ''​--display-name''​ can be chosen freely, ​the later being shown in the kernel selection of the notebook. The second command lists all known environments.+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>
-python -m ipykernel ​install --user --name wikidoku --display-name "​Python (wikidoku)"​ +conda install -y jinja2
-jupyter kernelspec list+
 </​code>​ </​code>​
  
-If installation of the kernel fails with the message ​''​/​usr/​bin/​python:​ No module named ipykernel'' ​the additional package ​''​jupyter'' ​needs to be installed and installation of the kernel ​repeated:+Next the new environment will be registered ​with the notebook. Terms for ''​--name'' ​and ''​--display-name'' ​(optional) can be chosen freely, the later being shown in the kernel ​selection of the notebook. The second command lists all known environments. ​ The last command exists the environment.
 <code bash> <code bash>
-python ​-m pip install jupyter+python3 ​-m ipykernel ​install ​--user --name wikidoku --display-name "​Python (wikidoku)"​ 
 +jupyter ​kernelspec list 
 +conda deactivate
 </​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. The last command exists ​the environment.+If installation of the kernel fails with the message ''/​usr/​bin/​python:​ No module named ipykernel''​ the additional ​package ''​jupyter'' ​needs to be installed ​and installation of the kernel repeated:
 <code bash> <code bash>
-conda install ​-y jinja2 +python3 ​-m pip install jupyter
-conda deactivate+
 </​code>​ </​code>​
  
Line 112: Line 112:
 <code bash> <code bash>
 conda install -y python=2.7 conda install -y python=2.7
-python ​-m pip install jupyter +python3 ​-m pip install jupyter 
-python ​-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)"​
 </​code>​ </​code>​
  
Line 121: Line 121:
 import sys import sys
 print (sys.version) print (sys.version)
 +</​code>​
 +
 +=== Removing an environment ===
 +
 +In order to remove an environment it has to be de-registered from the notebook server and then its files removed (optional but recommended). We list the installed kernels, de-register and remove the environment'​s files:
 +
 +<code bash>
 +jupyter kernelspec list
 +jupyter kernelspec remove wikidoku
 +rm -rf ./wikidoku
 </​code>​ </​code>​