I am working on an offline platform (no direct access to the internet).
And need to install many python modules.
So I download them manually, copy them to the server and then install using #pip install <package_path>
.
It is very difficult and time consuming...is there a way to download/create an offline repository or create a mirror in my environment??
best way of installing the python modules please.
Asked
Active
Viewed 73 times
0

Subbu VidyaSekar
- 2,503
- 3
- 21
- 39

MMH
- 9
- 3
-
Which type of access do you have on that platform ? You can think to make a virtualenv, create a tarball and then copy to the target host. – Blackat.net Aug 11 '20 at 12:17
-
What do you mean by no direct access the internet, and how is the platform your using connected to the server without an internet connection? – JaniniRami Aug 11 '20 at 12:19
-
https://stackoverflow.com/search?q=%5Bpip%5D+offline – phd Aug 11 '20 at 12:20
-
Esp. this answer: https://stackoverflow.com/a/14447068/7976758 – phd Aug 11 '20 at 12:20
-
From where you have installed the packages, in the command prompt pip freeze > req.txt A new file req.txt will be generated In the same command prompt type pip download -d wheel_packages -r req.txt (Ignore the -d wheel_packages, if you want it to download in the same folder) copy this wheel_packages folder in server where there is no internet and in cmd type dir /s /b "path_to_wheel_packages" > offline_req.txt A file named offine_req.txt will be generated. pip install --no-cache-dir -r offline_req.txt – jht Aug 11 '20 at 15:19