How add a Python virtual environment to your Jupyter Kernel list

Say you have a custom virtual environment named myEnv, in which you have meticulously setup an old Python version, together with some arcane packages (activated by source .myEnv/bin/activate), you must install package ipykernel to make this environment capable of interfacing with your host system Python installation in which you have Jupyter installed:

(myEnv) $ pip install ipykernel

Once that’s done, you can introduce your environment to Jupyter:

(myEnv) python -m ipykernel install --user --name "myEnv"

After one restart of your jupyter notebook server, the new kernel appears in the Kernel selection dropdown.


Posted

in

,

by

Tags: