Installing PIP on an old Linux Machine without internet

Hi all,

I am in a lab that has no internet and is using an older version of Linux. Because certain studies are already using the system as currently constructed attaching the internet or updating are out of the question.

I am trying to install PsychoPy for my own study but cannot seem to install it without pip. The computer we’re using doesn’t seem to have pip installed to allow me to install psychopy.

So my questions are:

  1. Is there a command I can use to verify that there is no pip currently installed?
  2. I have downloaded pip from github and tried to install it with no luck because the setup.py doesn’t run when selected. Any ideas?

Thanks in advance!

This varies greatly depending on the platform but python -m pip and/or python3 -m pip should be a sufficient test.

This is likely failing because it’s trying to pull in a ton of sub-dependencies from the internet.

I think the solution is a 2 step process:

  1. Bootstrap a pip installation on the target machine
    1. Download a pip wheel distribution on an internet-connected machine from PyPI
    2. Transfer it to the target machine
    3. Install with $ python pip-21.3.1-py3-none-any.whl/pip install pip-21.3.1-py3-none-any.whl
  2. Install PsychoPy and it’s dependencies
    1. Download all the dependencies that you need on a internet-connected machine
    2. Transfer them to the target machine
    3. Install with $ python -m pip install <whatever>

This is somewhat complicated by the fact that many of these dependencies have built distributions which are built for specific platforms and architectures. We’d need some more information about the target machine to determine if it’s actually feasible to do #2.

Once you do #1, you can run python -m pip debug --verbose to get a list of “Compatible tags” and share that here, along with more details about the machine (CPU, OS, etc).

Thank you for all your help!

I opened a terminal in the folder and followed your command, but it is unable to locate the package pip. I unzipped it as well and there has been no luck.

As far as version goes, I am being prompted to use “sudo apt install” I am not sure if that helps at all, but I thought it might be a helpful clue. Any information or guesses you have about resolving this would be greatly appreciated. Thank you for your help!