You have to understand that most of the file system in template based
qubes is not persistent. This can have some advantages.
Take a look at https://www.qubes-os.org/doc/templates
There are mechanisms for making some files/directories persistent
across reboots - https://www.qubes-os.org/doc/bind-dirs
As to installing software in templates, it is rarely necessary to give
the template network access. Don’t forget that the template has access
to a proxy via qrexec.
You can specify the proxy:
export https_proxy=127.0.0.1:8082
pip install....
or pip install --proxy=https://127.0.0.1:8082 ....
If you remember that the proxy is there, you will find that many
problems can be solved by searching for “using X behind a proxy”