Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 3 Next »

Utility Commands for Custom Kernels

After loading an environment

List your current kernels

jupyter kernelspec list

Remove a kernel

jupyter kernelspec uninstall {KERNEL_NAME}

Custom Python Environments in Jupyter

Load the desired version of python

module load python/3.10.5

Create a directory for your desired environment:

mkdir myenv
cd myenv
python -m venv .
. bin/activate

Once you are in the environment, install ipykernel with the following command:

pip install ipykernel

Add the environment to your jupyter kernels:

python -m ipykernel install --user --name=myenv --display-name "myenv"

Follow the instructions to launch jupyter. You should now be able to select the environment we just added:

image-20241112-192239.png


Custom Conda Environments in Jupyter

For information on how to create custom conda environments, please visit our guide:

Miniconda Environment Set Up - Storrs HPC - UConn Knowledge Base

Begin by activating/creating your desired environment:

conda create -n myenv

The python version can be specified as well if necessary:
conda create -n myenv python=3.7.3

conda activate myenv

Once you are in the environment, install ipykernel with the following command:

conda install ipykernel

Add the environment to your jupyter kernels:

python -m ipykernel install --user --name=myenv --display-name "myenv"

Follow the instructions to launch jupyter. You should now be able to select the environment we just added:

image-20241112-192239.png

  • No labels