You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Jupyterhub installation is based on the Anaconda distribution.

Separating libraries into distinct environments is a basic concept, e.g. environments for Python2 and Python3, each with a preinstalled set of libraries. Those environments can be managed with the conda package manager.


The software is installed in the folder /opt/miniconda3. For installation details, see the Jupyterhub blueprint.

If the "conda" command cannot be found, add the folder to the path variable: 

export PATH=$PATH:/opt/miniconda/bin


The command "conda info" gives basic information about the Anaconda installation. Here, information about the repositories (so-called channels) can be found. The channels can be defined in file .condarc, which should have the following content:

channels:

  - http://192.168.6.11/conda/pkgs/pro/linux-64/

  - http://192.168.6.11/conda/pkgs/r/linux-64/

  - http://192.168.6.11/conda/pkgs/free/linux-64/

  - http://192.168.6.11/conda/pkgs/main/linux-64/


To manage environments, use the command "conda env", e.g. "conda env list" to lists all conda environments. The Jupyterhub software itself is installed in environment "base". The other preinstalled Python environments are installed in /opt/miniconda3/envs/

To list the installed packages of the active environment type "conda list", or "conda list -n EnvName" to list packages of a particular environment.


The active environment can be switched by the conda activate command, e.g. "conda activate Anaconda-Python3.6".

Conda commands ususally refer to the activated command, unless specified by the -n (name) tag.


Additional libraries are installed by the conda install command, e.g. "conda install numpy" for the active conda environment, or "conda install -n Anaconda-Python3.6 numpy" to install it in that particular environment. This requires root permission.


The preinstalled environments (those located in /opt/miniconda3/env), cannot be modified by the user. The users' libraries are installed in the personal home directories under ~/.conda/

This directory contains the file environments.txt, where all private environments are listed, the subfolder "envs", where the private environmentes are installed.

It is also possible to access a shared environment (e.g. on the MCS). Place a symbolic link to the shared environment into folder  ~/.conda/envs/ and add this path to the environments.txt file.












  • No labels