Best way to install python package with all its dependencies on an offline pc.

OS is windows 10 on both PC’s.
Currently I do the following on an internet connected pc…

python -m venv /pathToDir

Then i cd into the dir and do
.scriptsactivate

then I install the package in this venv after that i deactivate the venv

using deactivate

then I zip up the folder and copy it to the offline pc, ensuring the paths are the same.
Then I extract it, and do a find and replace in all files for c:usersold_user to c:usersnew_user

Also I ensure that the python version installed on both pc’s is the same.

But i see that this method does not work reliably.. I managed to install open-webui this way but when i tried this with lightrag it failed due to some unknown reason.

submitted by /u/PlanetMercurial to r/Python
[link] [comments]


Commentaires

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *