I'd like to install a package via pip in a machine not connected on internet. The problem is a little bit messy but I'll try to be clear as much as I can. There are two remote machines I use to work connecting on them via ssh, let's call them M1 and M2. M2 is not ssh reachable directly from my computer but I need to go through M1, so the architecture is something like:
My computer -----> M1 -----> M2
ssh ssh
M1 is connected on the internet, so I'm able to make installations via pip, whereas M2 is not. Is there any way to make a pip install on M2 exploiting M1 ? I could download the packages folder and make the installations but since there are some dependences, I was wondering if there are more efficient ways to do it.
Thanks a lot in advance!
Edit: Both remote machines run Linux