How to install python from source without internet connection?

I am installing python in a custom location on the backend server. Unfortunately, here I can’t connect to the Internet. Most sites are blocked by a firewall. (basically a pypi repository!) Please don't ask for a reason. And I don't have a root account, so I need to install python from the source. I really installed python from source! But the problem in either of easy_install or pip not installed, because the forms are not available here. :(

How to install them in the current situation?

+6
source share
3 answers
  • Download the source files from the module you are interested in to your computer.
  • Upload it to a remote server (SCP)
  • Remove the tarball (e.g. tar -xvzf pack.tar.gz )
  • Set the current directory to the extracted folder (should contain a file called setup.py )
  • Install the module: python setup.py install (see documentation )

In my eyes, creating a local mirror, as suggested by Tim, is not worth it (of course, it depends on how often you plan to install / update Python modules on this remote machine ...)

+8
source

Download the source files from the appropriate modules and install them locally.

0
source
 easy_install /your/file/location/pack.tar.gz 
0
source

Source: https://habr.com/ru/post/905281/


All Articles