-
Remove old .venv and create a new one for your Python version.
-
Install needed packages.
pip install <packages> ... -
Write installed packages and their dependencies to
requirements.txt.pip freeze > requirements.txt -
Download packages. Note that
pip donwloadmay downloadtar.gzfiles without dependencies for building, whilepip wheelwon’t.pip wheel -r requirements.txt -
Move all whl files to the offline system.
-
Install packages on the offline system.
pip install -r requirements.txt --no-index --find-link .