Last active
January 11, 2024 03:48
-
-
Save kentwait/80ccdf0b485129a158db1faf69f65c3f to your computer and use it in GitHub Desktop.
Add Conda environment to Jupyterlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FIRST, Activate env to add to Jupyter, e.g. venv | |
# conda activate venv | |
# Then run this script | |
# Edit ENV_NAME variable to name the kernel | |
# Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore). | |
# This will be the label in JupyterLab | |
ENV_NAME=Conda | |
# Install ipykernel via conda/mamba | |
conda install ipykernel | |
# Add current active environment | |
ipython kernel install --user --name=${ENV_NAME} | |
# Deactivate env | |
conda deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment