We can use conda create command to create a virtual python environment easily. However, how to add this environment to jupyter notebook? In this tutorial, we will tell you how to do.
To create an environment using conda, you can read:
Install and Use Both Python 2 and Python 3 in Windows with Anaconda – Python Tutorial
To show all environments in you sysmte, you can read:
List All Created Virtual Environments in Conda – Anaconda Tutorial
How to add conda environment to jupyter kernel?
As to us, we have created these environments.
However, py37_yzl does not exist in jupyter notebook kernel list.
In order to add py37_yzl we can do as follows.
Step 1: activate py37_yzl
conda activate py37_yzl
Step 2: install ipykernel
python -m pip install ipykernel
If you have installed ipykernel, you can skip this step.
Step 3: add py37_yzl to jupyter notebook kernel list
python -m ipykernel install --user --name py37_yzl
Then, we will see:
Finally, you can see py37_yzl in jupyter notebook kernel list.