Is it possible to create a hierarchy of python virtualenvs? For example, on an HPC system, imagine that sysadmins install the global python, and library developers create a python virtual environment venv1, and app developers create their own virtual environment venv2.
Can the app developers source venv1, then source venv2 and then install their preferred dependencies without root access or alteration of the library virtualenv venv1?
Naively, I run:
~/tmp ❯❯❯ python3.9 -m venv venv1/
~/tmp ❯❯❯ python3.9 -m venv venv2/
~/tmp ❯❯❯ source venv1/bin/activate.fish
(venv1) ~/tmp ❯❯❯ echo $PATH
~/tmp/venv1/bin /usr/local/bin
(venv1) ~/tmp ❯❯❯ source venv2/bin/activate.fish
(venv2) ~/tmp ❯❯❯ echo $PATH
~/venv2/bin /usr/local/bin/
which doesn't work. So certainly they cannot be nested without some flags to the environments.