$ python -m venv $MYGROUP/python-venv # create a virtual environment
$ source $MYGROUP/python-venv/bin/activate # activate the environment, updating python paths
$ sg <projectcode> -c 'pip install astropy==4.1' # install astropy in the environment
$ deactivate # deactivate the environment, now cannot load packages installed in venv.
|