Creating a custom conda environment with specific python version

2024, Jan 22    

Creating a new environment with a specific python version and then add it as a kernel in juypyterlab

conda create -n environment_name python=3.10.13
source activate environment_name
pip install ipykernel
python -m ipykernel install --user --name environment_name

Source: https://stackoverflow.com/a/28840041

Removing a kernel from the current jupyterlab environment list

jupyter kernelspec uninstall environment_name

Uninstall an environemnt from conda

First list all the environments to see if the environment exist in conda

conda env list

If it exists then unistall the environment with all the installed packages using the following command

conda remove --name environment_name --all

Source: https://www.freecodecamp.org/news/how-to-delete-an-environment-in-conda/