Create a Jupyter Virtual Environment
If you need a specific Jupyter environment, because maybe you need specific Python modules or something like that, you've come to the right place.
Find a Location to Install
You will want to install your Jupyter Virtual Environment somewhere accessible from the PRISM Compute Nodes and all the cluster nodes, so it will need to either be in your home directory or in /private/groups/[lab_name] somewhere. For this example I'll use my home directory, /private/home/weiler.
Create Your Virtual Environment
I'll be creating this Virtual Environment in my home directory (but create it wherever you deem necessary). So:
cd /private/home/weiler
Then create the directory for the environment to go in:
mkdir jupyterhub_venv
Next create the environment!
cd jupyterhub_venv python3 -m venv jupyterhub
It will create an environment in /private/home/weiler/jupyter_env/jupyterhub.
Next we activate the environment:
source ~/jupyter_env/jupyterhub/bin/activate
Your prompt should now look something like this:
(jupyterhub) [weiler@mustard jupyter_venv]#
Install Requisite and Optional Packages
From there you will need to minimally install these three packages:
(jupyterhub) [weiler@mustard jupyter_venv]# pip3 install jupyterhub jupyterlab batchspawner
You will need those three packages to start. So definitely install those. You can additionally install any other python packages, such as:
(jupyterhub) [weiler@mustard jupyter_venv]# pip3 install numpy pandas
Exit Your Virtual Environment
To exit out of your virtual environment, simply do:
deactivate
and you should return to your regular shell.
Call Your Virtual Environment In JupyterHub
Once you login to JupyterHub on the cluster here:
https://jupyterhub.prism
You will want to click on the Advanced tab at the top. When defining your notebook resources, under "Jupyter environment", select "Custom". Then define your description and give the path to your /bin directory in your environment, as such:

It will then launch a notebook based on that environment, and all modules and packages installed in that environment will be available.