To create a virtual environment in terminal:

python -m venv env

Then activate it

source env/bin/activate

Then install jupyter notebook integration. Replace “projectname” with whatever you want your environment to be called when selecting it in jupyter notebook

pip install ipykernel
ipython kernel install --user --name=projectname