install ipykernel in virtualenv code example
Example 1: add kernel to jupyter
python -m ipykernel install --user --name=myenv
Example 2: jupyter from virtualenv
$ python -m venv projectname
$ source projectname/bin/activate
(venv) $ pip install ipykernel
(venv) $ ipython kernel install --user --name=projectname