Use virtual environment

Reference

If you want to use the conda virtual environment in jupyter notebook, you need to install the corresponding ipykernel and kernel first. Take virtual env myenv as example:

# activate the virtual env myenv
# `conda activate myenv` is ok as well
source activate myenv
conda install pip
conda install ipykernel
# replace myenv and "myenv" in practice
python -m ipykernel install --user --name myenv --display-name "myenv"