HOWTO: Use a Conda Environment With Jupyter

Before Conda environments may be used by Jupyter Notebooks they must be installed so that Jupyter knows about them. Older versions of Conda automatically installed a Jupyter kernel for themselves, that installation process now must be performed manually by the user.

To perform the installation the user should load their prefered version of Python, activate their Conda environment and run the following command:

NOTE: The ipykernel package should be installed in the conda environment first!
conda install -n $MYENV ipykernel
python -m ipykernel install --user --name "$MYENV" --display-name "Python ($MYENV)"

Where the variable MYENV is replaced with the name of the user's Conda environment. A fuller example:

module load python
source activate "$MYENV"
python -m ipykernel install --user --name "$MYENV" --display-name "Python ($MYENV)"

If the envirnoment is rebuilt or renamed, you may want to erase the installation of a custom jupyter kernel.

This command will erase entire directories and the files within them. Be careful!
rm -rf ~/.local/share/jupyter/kernels/$(MYENV)