Unidata / science-gateway

Unidata Science Gateway on the NSF Jetstream2 Cloud
https://science-gateway.unidata.ucar.edu/
BSD 3-Clause "New" or "Revised" License
19 stars 13 forks source link

My custom conda environments are no longer available in Jupyter #242

Closed rsignell-usgs closed 6 years ago

rsignell-usgs commented 6 years ago

When I open a terminal in JupyterHub, I can see my custom conda environments:

rsignell@f0a002cd72fe:/notebooks/rsignell$ conda info -e
# conda environments:
#
IOOS                     /notebooks/rsignell/my-conda-envs/IOOS
globus                   /notebooks/rsignell/my-conda-envs/globus
hsds                     /notebooks/rsignell/my-conda-envs/hsds
mi                       /notebooks/rsignell/my-conda-envs/mi
pygdp                    /notebooks/rsignell/my-conda-envs/pygdp
globus                   /opt/conda/envs/globus
root                  *  /opt/conda

But when I fire up my Dust Bowl notebook, it can't find the pygdp kernel that it needs: 2017-11-03_10-23-10

In fact, none of my custom kernels are selectable: 2017-11-03_10-27-11

rsignell-usgs commented 6 years ago

Okay, it turned out that my ~/.condarc file got blown away, and even though I could do conda info -e and seem my environments, I needed to recreate my ~/.condarc like this:

$more ~/.condarc
channels:
  - conda-forge
  - defaults
envs_dirs:
  - /notebooks/rsignell/my-conda-envs/
julienchastang commented 6 years ago

Along with #244 Rich and I also discovered that the environment in question must have nb_conda_kernels installed in order to be available via Kernel, Kernel Change