bash script starting new shell and continuing to run commands [duplicate]
As per the manual :
shell will spawn a shell with the virtualenv activated.
which is not what you need. Instead use run
:
run will run a given command from the virtualenv, with any arguments forwarded (e.g. $ pipenv run python).
In your case, something like
pipenv run python -m ipykernel install --user --name==new-virtual-env