how to choose virtual env for jupyter code example
Example 1: jupyter from virtualenv
$ python -m venv projectname
$ source projectname/bin/activate
(venv) $ pip install ipykernel
(venv) $ ipython kernel install --user --name=projectname
Example 2: how to add virtual environment in jupyter notebook
python -m ipykernel install --user --name=<my_env_name>