how to activate environment in jupyter notebook 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: open jupyter notebook with conda envirionment
conda install -c anaconda ipykernel
Example 3: jupyter notebook in environment
python -m ipykernel install --user --name=firstEnv