First, python and pip themselves have to be installed.
Download virtualenv, setup-tools to a directory, and copy it to internal PC.
pip install --user virtualenv...whl
virtualenv --python=python3 --no-download --extra-search-dir=${VIRTUALENV_INSTALL_PACKAGES}
Now freeze an environment from an external PC, copy them to internal PC
pip freeze > r.txt
#remove pkg-source from r.txt
pip download -d packages -r r.txt
Reconstruct frozen virtualenv
pip install --no-index --find-links=${PACKAGES_DIR} -r r.txt