mamba-org / gator

Conda environment and package management extension from within Jupyter
Other
260 stars 30 forks source link

would like to install on system level #48

Closed joequant closed 4 years ago

joequant commented 4 years ago

What i would like to do is to install jupyter_conda at the system level to allow users to set up their own local conda environments. however when I try to install conda with pip i get

[joe@mcdull extensions]$ pip3 install nb-conda-kernels ERROR: Could not find a version that satisfies the requirement nb-conda-kernels (from versions: none) ERROR: No matching distribution found for nb-conda-kernels

Any pointers for allowing me to do something like this?

fcollonval commented 4 years ago

Hey @joequant

The main hypothesis is that you are using/must use conda. So to achieve this, you need to install the base conda environment at the system level. And in that environment you will install jupyterlab or notebook, nb-conda-kernels and this extension.

The tricky part is to enable the base conda environment for all users in their terminal. For that you could take a look at the miniconda dockerfile.

The trick lies in https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/debian/Dockerfile#L14 where you link the conda init script to /etc/profile.d so it gets loaded for all users: ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The last trick you will need is to activate the base environment for each user (conda activate base).

Note: nb_conda_kernels is only available as conda package. So pip will never find it.