change environment virtualenv jupyter code example Example: how to add virtual environment in jupyter notebook python -m ipykernel install --user --name=<my_env_name>