0

I'm currently creating a project I'm python and I need to post to a http server.I tried using pip install requests but pip doesn't work on my computer.

Pls how do I get the request library because it is not present in my python default libraries. Please I need something like a link or a website

where I can download and successfully install request library for python27.Thanks

Pradeep
  • 8,641
  • 13
  • 23
  • 33
Armadillo
  • 1
  • 2
  • 1
    Is there a reason you don't want to fix the "pip doesn't work on my computer", which is probably going to cause a whole slew of other problems for you beyond this one? – abarnert Jun 12 '18 at 00:35
  • https://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows#12476379 Install pip – Jesse Jun 12 '18 at 00:38

1 Answers1

0

If you go to PyPI.org and look up a package there, it will have a bunch of "Navigation" and "Project Links" links on the left side.

Start with Homepage if present. In the case of Requests, "Homepage" will take you to documentation where, right at the top, there's a link that says "Release v2.18.4 (Installation)". Click on that, and it'll tell you how to download and install from source.

If you can't find that for some package, try "Download" next, which will hopefully have nice friendly download links.

Failing that, click on "Download files", and you should get a table containing at least one entry of type "Source", with a link to a source tarball (or zipfile).

If you've found directions to install from source, great. If not, unpack the archive and scan through it trying to find an INSTALL or README or other doc that tells you have to install it.

Most current packages with up-to-date documentation are going to tell you to install the source (maybe after a manual build step) with pip install . (with or without sudo). If you really can't use pip at all for some strange reason, usually you'll be OK doing this instead (again, with or without sudo):

python setup.py install

However, you will often need to manually download and install some prerequisites. Look for a requirements.txt file, and recursively download and install each thing on that list, then come back to this package.

Finally, at the end of all of this, you won't have any good record of what you installed, what versions you had, which packages were dependencies of other packages, etc. Upgrading to new versions, or migrating your environment to a different machine, will be a nightmare. And so on. All the stuff pip does for you, you don't get if you don't use pip. But if you really want to do it all manually, you can.

abarnert
  • 313,628
  • 35
  • 508
  • 596