Skip to article frontmatterSkip to article content

We are excited to announce that, beginning in Fall 2025, we will introduce the ability to create a shared Conda environment for instructors in selected hubs. This feature will allow instructors to create a custom kernel, install the desired packages, and have those changes automatically reflected in the student kernel. This streamlined process provides autonomy to instructors in making quick changes to the instructional environment.

If you are interested in piloting the shared Conda environment in your hub, we encourage you to contact the DataHub team via GitHub for more information and to express your interest.

Steps for Creating and Registering a Shared Conda Environment in Jupyter

Tips

Step-by-Step Guide

conda init

If you see the “No action taken” error, run the following

source ~/.bashrc
conda list --explicit --prefix /srv/conda/envs/notebook > base-env.txt
conda create --prefix /srv/conda/envs/shared_conda --file base-env.txt

Create a conda environment from the ‘base’ conda environment

conda list --explicit --prefix /srv/conda > base-env.txt
conda create --prefix /srv/conda/envs/shared_conda --file base-env.txt
conda activate /srv/conda/envs/shared_conda
conda install numpy pandas -y

You may install any additional packages needed for the course.

conda install ipykernel -y
python -m ipykernel install \
--name shared_conda \
--display-name "Python (<bcourse_id or whatever you want>)" \
--prefix /srv/conda/envs/shared_conda
jupyter kernelspec list

This will display all available Jupyter kernels.

conda deactivate

Steps for Removing a Conda Environment

In case you want to remove the conda environment, run the following

conda env remove --prefix /srv/conda/envs/shared_conda