Conda/Virtual environments must be installed on JupyterLab or Jupyter Notebook prior to use. Whereas older versions of Conda automatically installed a Jupyter kernel, users must now manually perform the installation process.
To perform the installation, users should load the preferred version of Python, activate the Conda/Virtual environment and run the following commands.
# change to the proper version of python module load python # replace with the name of conda env MYENV='useful-project-name' # Activate your conda/virtual environment ## For Conda environment source activate "$MYENV" ## For Python Virtual environment source /path/to/$MYENV/bin/activate # Install Jupyter kernel python -m ipykernel install --user --name "$MYENV" --display-name "Python ($MYENV)"
If the envirnoment is rebuilt or renamed, users may want to erase any custom jupyter kernel installations.
rm -rf ~/.local/share/jupyter/kernels/$(MYENV)