1

I have a machine where Python 3.1 is installed. I want to install module "requests", but I have no pip and the machine is offline (no setuptools nor distribute). What should I do ?

Is it possible to install the module in my case ?

ESCoder
  • 15,431
  • 2
  • 19
  • 42
hawarden_
  • 1,904
  • 5
  • 28
  • 48
  • 1
    Get a new machine, or at least update Python. The last version of requests supporting Python 3.1 is 7 years old. And Python 3.1 is even older. – Klaus D. Mar 16 '20 at 18:30
  • Are you sure it's Python 3.1? That's over 10 years old. And the current version of `requests` supports a Python version >= 3.5. – Matthias Mar 16 '20 at 18:31
  • Yes I am sure, and it's on Windows 2008, now I need a solution ... – hawarden_ Mar 16 '20 at 18:33
  • Does this answer your question? [How to install packages offline?](https://stackoverflow.com/questions/11091623/how-to-install-packages-offline) – AMC Mar 18 '20 at 19:23

1 Answers1

3

You can grab a copy of requests from the repo: https://github.com/psf/requests/blob/master/README.md

git clone git://github.com/psf/requests.git

As noted in the comments requests only supports 2.7 and 3.5+ you can try hacking it up but, this is the supported method by the developers of the module.

I can safely tell you that the version you are looking for is between 0.2.4 (2011-02-19) which is when 2.5 support was added and 0.14.1 (2012-10-01) when 3.3 support was added.

There is a side note that 2.5 support was dropped on 0.10.1 (2012-01-23) and python 3 support was added. I started at 1.0.0 and worked my way through the change log. https://pypi.org/project/requests/1.0.0/#description

In all likelihood you are looking at 0.10.1 - 0.14.1 for the exact package. From there just download and install with the setup.py as per usual.

  • Latest version I could find for Python 3.1 is 1.1.0: https://pypi.org/project/requests/1.1.0/#files -- https://github.com/psf/requests/tree/v1.1.0 – sinoroc Mar 17 '20 at 10:14